noob question re:pre-existing folders

Before I found Syncthing I duplicated my hard drives and then put the redundant drive into a different PC. Keeping them in sync was a pain, but I did it. Then I discovered syncthing. Here’s what I’m trying to do:

On PC A take D:\ share as ‘Data’ folder On PC B accept shared ‘Data’ folder and point it to D:\

Is Syncthing smart enough to recognize that D:\ already has the same files and folders on both systems and doesn’t therefore synch anything during the initial sync? If it does not recognize that they’re identical, does it delete files on one or both systems or duplicate files?

I’ve got terrabytes of data, so duplicating the drives manually within the same case, and then putting the redundant drive in PC B was significantly quicker than copying over the wire. Given that there’s already data on PC B’s D:\ am I better off leaving it alone and letting Syncthing figure it out, or should I stop sharing the folder on PC A, delete everything from PC B’s D:\ and then re-share the folders in Syncthing? (My concern here is if Syncthing determines that content on PC B’s D:\ was deleted and therefore should be deleted on PC A’s D:.)

Thanks in advance.

When adding a new folder, syncthing will first index it by reading all files, hashing them and adding this information to a database. This initial index (called scanning) can take some time on large folders. Subsequent scans are a lot faster. At some point the indexes will be send to other devices in the cluster - then the actual synchronization begins.

Essentially, the behaviour for each new file is as follows (with both devices having their folders configured as send-receive):

  • If a file exists on A, but does not on B, it gets created on B.
  • If a file exists on B, but does not on A, it gets created on A.
  • If a file exists on both A and B, the following applies:
    • If the content, the permissions and the timestamp are identical, nothing happens.
    • If the contents are identical, but either permissions or timestamps are not, this soft-conflict gets automatically resolved.
    • If the contents are not identical: One of the two versions remains as-is, the other one is renamed to a .sync-conflict file.

(This also works with more than two devices. The above assumes two devices for clarity. A new file means a file newly seen by syncthing, e.g on the initial synchronization every file is “new”)

After syncthing has finished the initial synchronization for a file, a deletion of that file will be counted as a deletion and will be propagated to other devices.

Syncthing also has addtional modes, such as send-only folders. Those won’t accept any changes advertised by remote devices. Such folder modes obviously behave differently than what is described above.

Also, while syncthing generally tries to be safe from data loss, having a backup is always advised.

You could set the folders to send-only on both devices before connecting them. Then watch what the out of sync items list shows on either side. Once you’re happy with the result, switch one or both of them to send-receive.

If you’re only after syncing changes in one direction, that would be a sensible configuration and,you can press the override changes button on the send-only side to resolve any remaining differences.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.