I am using Syncthing for syncing my keepass database between my pc and android.
A lot of time I edit file on both devices when syncthing is not connected (I use sync only when USB tethering).
This lead to a sync conflict. Last edited database get synced and earlier when gets corrupted.
To prevent this I want syncthing to automatically copy a version of database when it notices it is edited and then do whatever it wants. So that I can recover data from earliar version.
I thought versioning will serve similar function but it only save a copy when it is deleted or created there (I am using simple versioning).
So how to configure Syncthing to serve my purpose.
Given the unusual workflow, if the goal is to end up with a single KeePass database file, have you considered using the mass storage mode when USB tethering?
Then use the import/export option – or database merge, if available – to combine edits made on the PC and Android devices.
Yeah, so just as an FYI, I also sync my KeePass databases across lots of devices and it does happen to me as well that I get a conflict, because some device wasn’t up to date at some point.
When that happens, it’s no biggie though: KeePass has an inbuild database synchronization mechanism (File → Synchronize → Synchronize with file, then select the sync-conflict file) that gets both versions merged - there’s no “corruption” or anything like that, and you won’t loose any changes to your DBs. Afterwards you can simply delete the sync-conflict. So there’s no need for any complicated logic here, just let KeePass do the magic.