Replacing a Sync Target Folder

A few months ago, I set up syncing between Windows servers in two remote offices, it’s been working fine. In the beginning, we only wanted a couple of critical directories synced, so I set up two sync tasks, one for each directory. Now the situation has changed and we need ALL the subdirectories synced.

The directory tree (Source) looks like this:

Data Directory
 |- Dir1 (Sync No. 1)
 |- Dir2 (Sync No. 2)
 |- Dir3
 |- [...]
 |- Dir100

The directory tree (Target) looks like this:

Data Directory
 |- Dir1 (Sync No. 1)
 |- Dir2 (Sync No. 2)

What I want to do is sync the entire data directory from the Source to the Target without losing any files in the process and without having to redo shares, etc. all while keeping both servers in operation and syncing the two existing directories.

Can I stop the two current sync tasks and start a new one in the data directory without removing the files on the target system (or losing data on the source)?

It should work without troubles if the folders are actually in sync and do not have any differing settings like ignore patterns.

You can add a new share for the parent folder even while the previous ones are still active, as long as it’s only the two devices involved. You might want to add the parent folder on each side separately, without sharing them to the other device (but still with the same folder ID). Then you can watch the file counts go up and verify it’s seeing what it’s supposed to.

Make sure you have a backup ready, just in case.

If it’s OK for your usage, you can stop sharing the old folders between the devices now, to avoid any ongoing changes being propagated to the Target. Just uncheck the sharing checkmark on one or both sides.

Then set the Source to “Send Only” and tick the mutual sharing checkmarks for the new folder. That will prevent your folders which are only on the Source from being mangled or worst-case deleted. Watch the additional data getting synchronized over to Target. When it finishes, the global and local state counts should be identical, assuming there are no additional folders / files on Target.

Finally if that goes well, you can remove the old folder shares from Syncthing and set the new share to “Send & Receive” on both ends.

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