Hi!
I want to sync my files between three servers. I want two servers to be masters (any changes on any of them will change files on all servers) and one server to be slave (masters just overwrite any changes there).
Is it possible?
Hi!
I want to sync my files between three servers. I want two servers to be masters (any changes on any of them will change files on all servers) and one server to be slave (masters just overwrite any changes there).
Is it possible?
As @jedie says, this isnât currently supported. A master repository is protected against all external changes, so changes from the âother masterâ wonât be allowed.
But I think there is a relatively simple solution. Suppose you want changes to be synced two-way between A and B, but you want C to accept all changes and not propagate any (so A and B would both be masters, and C would be what other software calls read-only nodes).
Suppose the things you want synced live in directory ~/D1 (at least in machine A).
In A add two folders (I mean, âFoldersâ in the sense of the user interface of ST, not in the âdirectory of a filesystemâ sense)
both of them use as Folder Path ~/D1, but in A-one-way-C, âFolder masterâ is checked.
Now, in both B and C accept the creation of the new folder, use ~/D1 (or whatever) in your filesystem, and you are done.
I just tried it, and it works fine. The key idea is that syncthing has no trouble using the same directory in different âFoldersâ, so you can share it in different ways (as âMasterâ and as non master).
This is not as simple as checking boxes for âread onlyâ, etc, but it seems to work and is just fine (at least for small numbers of interconnected nodes).
P.S. You might also think about adding, in B, a B-one-way-C but this to me is confusing and when playing with it, it can lead to trouble. This makes sense: if you have just
A-one-way-C A-two-way-B
it is unambiguous how changes can and cannot propagate. If you add B-one-way-C then it ainât.
Thatâs both neat and a bit scary
Scary? Oh, oh. That means I can expect trouble using this?
Yeah, multiple sync basically needs to be added to the stack of TODO stuff as a reqested feature. There are some work-arounnds⌠ie you might be able to patch the source code to get it to workâŚ
If we get this working,Syncthing can be an augmentation to or replacement for services like DropboxâŚ
Another problem I noticed personally is that when I syncâd three servers with one master, it did not increase the speed of an upload over two servers considerably. At least for me, the two servers donât seem to be doing the bittorrent (âgrab the rarest chunk firstâ) method. But I havenât reviewed that part of the code yet.
The better long term feature is to put this into the next release of the protocol
Syncthing only shares pieces to other devices if it has the complete file - see #950 Also each device needs to share with all other devices as Syncthing does not exchange everything with everyone (like BTSync)
Yeah youâre right. This is definitely something I want to fix first thing, or at least make it an option.
Thatâs really important to me because I want simultanous backup and distributed network filesystem in the same program.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.