Let’s start at the beginning.
You define a folder on
device.1 that is full. The folder gets added to
device.2 and pointed to an empty directory on
How does syncthing know it should copy the contents of the full directory on
device.1 to the empty directory on
device.2, and not sync the opposite way and empty the full directory on
Does syncthing just always assume the empty directory is the one to be copied to, specifically on an initial setup?
What if we change the hypothetical just a bit. What if the initial setup is a full folder on
device.1 and the corresponding folder on
device.2 just has two tiny files?
Is this just bad form? Should I just always make sure that both sides are either identical to start OR that one side is completely empty to start?
In reading the FAQ, it seems that syncthing does not have any concept of “Master” and “Slave” (or “Primary” and “Secondary”, or “Source” and “Destination”). It seems instead that having two different folders can result in a “race condition” to see which gets scanned first.
But that can’t always be true, can it? Or else a lot of people would be very angry when their full folders got wiped out in the initial setup, as I described in my questions above.
Here’s another hypothetical:
device.1 has three files,
file.3, each 200 MB.
device.2 is empty but only has a 500 MB capacity.
device.1 starts syncing to
device.2 (presumably, via whatever magic answers my question above) and successfully syncs
file.1 and 'file.2`.
But then - oh no! - there’s no space to sync
Now, I’d assume at this point that syncthing would stop syncing until enough space is freed. But now
file.3 is missing from
device.2. Is there a risk at some point that syncthing will scan
device.2, not find
file.3, and then delete it from
file.3 get flagged in the database as “to be synced” on
device.1, and it won’t be touched, no matter the state of
device.2 until that sync pushes through first?