Multiple devices as "master folder"?

This doubt arose out of following use case, which I think is not possible at the moment with syncthing:

I have a folder shared between 2 devices, A and B. None of A or B has “Folder master” checked, so all changes propagate bi-directionally on A and B. So far so good. Now, I want to share this folder with my friend but in a ‘read-only’ mode (lets call my friend’s device C). This means that I still want to sync the folder bidirectionally for any changes on A and B. However, C should only be able to receive those changes but not make any new changes (or ignore/override any change made by C).

Can this be done?

I initially though that if I mark the folder to be “Folder master” on both A and B, it can be achieved. But, I read on forum that it is not like that - both A and B will be sitting with their own changes. If that is correct, does it mean that for a meaningful share exactly one of the devices in a cluster can be set to “Folder master”? It will be good to understand the sync behavior when more than one devices have “Folder master” checked. Eg: In a cluster of 4 devices, (A,B,C,D), A & B has “Folder master” checked. Then what files does C & D get? Does changes between C and D propagate bidirectionally?

I was able to do “Read-only” share using bittorrent sync. This is the only thing I miss in syncthing. I wish there is a way to do it…

2 Likes

This is not currently possible. You want https://github.com/syncthing/syncthing/issues/62 (and you’re not alone…).

Ah, I see. Somehow I could not find that issue when I was searching.

What happens in above scenario?

Changes propagate

  • A → C & D
  • B → C & D
  • C ⇄ D

Neither A nor B will accept any changes from the outside. That’s what Master does and all that it does.

I wouldn’t recommend this setup. Change something on A and it syncs to C and D. Change the same thing on B and you have a conflict on both C and D.

Would it make sense to set up syncthing like this:

  • A → C & D (FolderName: MasterA)
  • B → C & D (FolderName: MasterB)
  • A ⇄ B (FolderName: ShareAB)
  • C ⇄ D (FolderName: ShareCD)

A is Master for C&D B is Master for C&D, too but a separate folderID. A shared the same Data in a different folderID with B C shared the same Data in a different folderID with D

Legend:

  • → indicates Master
  • ⇄ indicates normal share

It would involve nested folders…

This seems to be complicated. Are you implying to share same folder-path multiple times with different FolderID? Is it a recommended thing to do?

It is complicated. It’s not exactly recommended. It may have surprising effects on conflict handling. It may also work around the issue you’re trying to solve, though.

Even if it would be working… It surely doesn´t scale…

Maybe the only problem is that not exist a “receive only” share, or the share can’t configured in “Send only” or “send receive” in a per devices way.

I solve similar problem in a “dirty way”.

I create share a folder between 3 PC A,B,C in Send&Recive mode. No problem.

Then I need to share the same folder in my phone but the phone only “receive” the files I dont care the changes in the phone.

So I created another share in 3 PC A,B,C but in “Send Only” mode. but in the same location that the first share (Send&Recive) and the share in “send only” is send to the phone.

The send only share complain “out of sync” between 3 PC but i dont care because the folder in sync but the send-receive.

so to send the “changes” to the phone I need press button overrrides changes in any PC.

1 Like