I have Syncthing running on FreeNAS (FreeBSD-Syncthing v1.8.0), and very soon I am going to need to upgrade to TrueNAS which means that I will likely have to rebuild Syncthing from scratch (The upgrade will likely also upgrade the Syncthing binary as well). Unfortunately the autoupdate function doesn’t seem to be enabled.
The plugin config directory is
config dir: /usr/local/etc/syncthing
and it contains the following files:
cert.pem
config.xml
csrftokens.txt
https-cert.pem
https-key.pem
key.pem
If I just backup this directory and restore it to the same path in the new jail will that work? Is there anything else I need to backup/restore?
Will Syncthing automatically update it’s config when the program version changes?
Thanks for the reply. Just for clarity, are you saying that if I back up the contents of the config directory /usr/local/etc/syncthing and then restore it once I have done a clean install of syncthing that everything should work just as it did before?
You likely don’t want to back up and restore everything. It’s likely that the database is stored in the same place. The safe option is not to restore the database, only the keys and config. Then all files will be reindex. If you are 100% certain that all data and all paths are the same after upgrade, then you can also keep the database. If data disappears (e.g. because it’s at a different path) and you keep the database, all files will be marked as deleted and thus also deleted on other devices.
I delete, the entire syncthing install (which is essentially in a virtual machine, and I delete the whole machine.) I then recreate syncthing (with the updated version) and restore /usr/local/etc/syncthing with the exception of index-v0.14.0.db (which as I write this is a tiny file of only 12 bytes.
Am I correct in assuming that syncthing will create a new db file, rescan syncdir1 and more or less instantly be back in sync [directory was in sync before the update and nothing has changed]?
Since the db file is so small I’m assuming that it only keeps track of new additions and deletions until the program has a chance to get everything back in sync. I want to make sure that syncthing doesn’t empty both directories.
index-v0.14.0.db is not a file but a directory, and definitely bigger than 12 bytes. The db holds information on all files that are in Syncthing folders, not just changes.