Syncthing local file history when no network connection

I have three systems running for simplicity A B and C, and have all three set up for staggered file versioning, I have noticed that local changes to files appear on the other two systems in .stversions but not in the local .stversions; so as long as there is a connection with another system then I can always recover a version of a file I have been working on.

one system is a laptop and sometimes has no network connectivity with the other two systems so any changes made to files during this time are not recorded except the last one before connecting with the other systems so would it be possible to implement a copy of version changes during this time similar to windows 8 file history which stores version changes etc until it connects with its backup drive?

How? We will only discover that the file has changed after it has changed.

The local database knows the local file has changed, syncthing knows there is no other devices available, with this information syncthing can make a copy of the file and store it in the local .stversions as it does when it detects remote changes?

At the point syncthing knows that, the file has already changed, so we don’t know what it looked like before, there is no way to know whatit looked like before the change.

1 Like

It sounds like you want a backup tool or a version control tool for that use-case, not a file synchronization tool?

Hi Anthony,

With my configuration and when all devices are on line I get both the version control and the file synchronization albeit that I have to go to the other devices when I want to recover an old version and all my user directories are replicated to the other devices; if I have a catastrophic failure I can switch to the other device, a perfect solution for me.

Having considered the request again I see its a catch 22 situation, when there is no network connectivity; syncthing only knows the file has changed on the local system so has no copy of the file before it is changed.

What I thought was something easy to implement is turning out to be a lot more complex and as you point out this is a file sync tool not a versioning tool although I do get this when the devices are all connected.

it would make a fantastic bolt on though :smile:

Just thought I would update this for anyone searching for a versioning solution, I found an open source application for windows called autover

I have set autover to make backups of my Documents directory to Documents-Versions both of these directories are being synced.

autover also has a great gui for recovering old versions it would be great if syncthing had a similar one.

During my setup and testing I made the mistake of editing .stignore file while syncthing was running and ended up with various files being reported as out of sync but did not sync so I stopped syncthing on all three of my devices and removed the databases, deleted the directories which had the sync errors on all but one device (deleting and recreating the databases did not resolve this error) restarted syncthing and my devices synced up without error this was when I noticed that autover had created backups of the files that were being synced to my other two devices hence my following note:-

Turn autover off on the directories you are syncing with syncthing while you are adding a device or new directory to sync; if you don’t autover will create a backup of the files syncthing is accessing, syncthing rescans of the sync directories does not have this problem, nor does syncs of the changed files after the initial sync has completed which I find strange as I would have thought there would be no difference in behavior.

other than the caveat above syncthing and autover appear to coexist quite happily, all my devices report in sync with no errors, if this continues without problems I will have found my perfect backup/versioning solution :slight_smile: