Syncthing cannot be used as a backup utility, right? Due to the inherently bidirectional approach, any change made to the backup side would be kicked back to the original data.
OK, I’m using ST in a scenario with revolving backups. My backup disk has enough space to contain about twenty backup sets of about 20 GiB each.
For each day in the week, one of these sets is used as the backup medium. The backup sets are folders on the backup disk named after the day in the week (So, Mo, Di and so on, these are German abbreviations).
Furthermore, I transformed an initial configuration file containing the codes for one special day into a template (configTemplate.xml), replacing the day name with a special pattern.
At system startup time, the config template gets transformed by a script into the actual configuration file config.xml for that day. As a result, ST sees every day a different target for the synchronization. The targets will be reused after seven days.
At the end of a day, the daily backup set gets once copied (by hand) to a monthly backup set. After the end of a month, the monthly backup gets burnt to a DVD.
This setup works for me, because the backup disk does not get involved in any other activities than backup. So there will be no changes that could inadvertently be re-transferred into the original data.
Neat. I wonder though, when the daily replacement of config & restart happens, doesn’t it suddenly see the files as having been changed or removed and want to sync those changes back to the original source?
What I do is somewhat similar - I let Syncthing do it’s thing but use regular filesystem snapshots (zfs) to lock down the data on the backup destination.
Syncthing is clever enough to see that those files within the re-used backup directory are “old” ones. Clearly, each backup directory have their own .stfolder and .stignore files. Furthermore, the original backup sources on the file server are marked als folder masters.
I know it works because my backup directories are filled by means of my earlier setup of some proprietary synchronization software, which I now gladly can dispose of.
Yes, I run into a couple of “Out of Sync” messages. In this case I simply press “Override changes” on the GUI, and all is well.
By the way, for scenarios as this one, I could think of an option per folder to force synchronization from the folder master, so as not have to press “Override changes”. What else is the purpose of the folder master? For those who like to have the control over the whole process, the button is fine. I personally could do without it.
That filesystem snapshot thing (zfs): What is that? Does it run on Linux, on Windows? Just asking because that is what I’m doing here, taking snapshots and storing them elsewhere. Perhaps I could my life make even easier than with my admittedly somewhat complicated approach.
I’m using syncthing to do normal syncing and then use rsync to do backups on another disk. To reduce space hardlinks are used for files that are not changed between backups. I think I used this to write the script that is running on both of my raspberry pis (to have a backup at two different locations)