Hi. I recently suffered a anomalous disk ejection on my primary Unraid server. The primary machine was in a send only configuration with two other servers that were configured as receive only. After the disk was lost the server did not panic and crash it just carried on and Syncthing started deleting the now missing flies on the primary from the two secondary machines. One of the secondary machines, also an Unraid server, suffered quite extensive loss before being caught, the other, a Synology NAS faired better and only one filesystem was damaged. So now I want to use the Synology NAS to repopulate the two Unraid servers. I paused all devices and folders on all the systems and and came up with a partial strategy to do the recovery. Firstly I reconfigured all the folders on the Synology NAS as Send Only rather than Receive Only, and then went through all the folders on the secondary/BACKUP UNRAID NAS and added the Synology, I didn’t need to change the sync direction as they were already in Receive Only mode. Once everything was reconfigured I unpaused the devices and folders on both systems one at a time allowing each folder to resynchronize in isolation. Once those two machines had synchronized I turned to re-syncing the main NAS from the Synology. Everything was completed in exactly the same way as previously stipulated, except for 2 folders. Both these folders on the primary Unraid NAS have significant loss in comparison to the Synology, but in addition the folders on the Unraid NAS were still receiving data that was not replicated to the Synology. So to my problem: How do I synchronize these two folders without losing the differences on both sides of the synchronization. If I use the Send/Receive mode on both sides will it synchronize without deleting anything from either side? or will it remove anything from both sides that is not present on the opposite side of the link. Thank you for any enlightenment you can offer.
It sounds to me like you now want to merge two sides: one side has file A, the other has file B, you want both to end up with A+B. This will happen if you add the folders with no prior history. Thus I suggest:
- Removing the folder from the Syncthing GUI, on both sides. (This will leave the files on disk).
- Restart Syncthing to be sure it forgets the folder completely. (Shouldn’t be necessary, but there’s been reports of the opposite.)
- Re-add the folder on both sides, using the same folder ID (maybe let it be auto-generated on one side, then type that in on the other side).
- Let both sides finish scanning.
- Share the folder in both directions. It’ll be merged.
Thanks for the assistance. I have reconfigured the two folders and they are syncing. Can I ask, if configuring both sides of the transfer as Send/Receive and this allows bit filesystem to merge so all differences are replicated between the two machines, what happens of there are three machines all sharing the same data via Send/Receive links? Also what happens if a machine legitimately deletes a file will the other two see this a valid deletion and delete their local copy or an anomaly and try to send the deleted file back to the machine that it was deleted on. So my question is if during a merge nothing is deleted how does Syncthing determine once all machines are consistent that some file is deleted and not just to be replaced from the machines that have a copy Thanks again
Syncthing uses a database. Files are added to the database when they are synced or discovered locally. A file is considered deleted when it doesn’t exist on disk anymore but exists in the database.