Copying over disaster

Once again a copied a syncthing install over to a new pc. I made a couple of what seem like minor errors but the result was nearly a catastrophe. I forgot to put the dummy directory in the directories to be synced. Stopped it, put them in and restarted. The other mistake was not having the new pc backed up with the whole content from the old, so all it had to do was check everything was the same. I had done that in fact, but then got distracted and did not get back to finishing the job for four weeks or so. When I went back to my main pc the new one syncs to - the one the older pc used to sync to, I discovered to my absolute horror that it had somehow got dates wrong, taken the new pc as the reference, and deleted everything from the last four weeks on my main pc to which it syncs. By the grace of good fortune my main docs were open, so all I had to do was save and overwrite. I hasten to add I do not use sync as a backup. I backup with dropbox and several thumb drives. But of course, dropbox got blitzed as well by all this. I thought I would write in as I imagine this is massively not the kind of thing the devs want to have happen.

Yeah, copying an existing installation with database and everything is quite dangerous. I never do that, I set it up from scratch on any new device.

2 Likes

It can work, but I always set one side to send only (from send-receive) so on my central NAS deletes from the peer don’t get propagated. So the send-only share is “golden”. But there are indeed scenarios where deletes or changes propagate and can result in data loss. That is why you also must have a seperate backup of data. Syncthing is no backup, but can be part of self-build backup solution.

A backup should always be detached from the source and not “sync” in two ways.

1 Like

That, and consider copying the certificates and config but not the database. The database is the dangerous part.

1 Like

Even after almost 10 years contributing to the Syncthing project and using it. This makes my day. I normally copy over the sync cache database. Luckily things didn’t break. Will take this tip into account when migrating a device id!