I have a send-only sync of all my non-OS drives on my desktop.
Windows Desktop -> Linux Server. Both running latest syncthing (1.6.1 at time of post).
I reinstalled the OS on my desktop which wiped my syncthing DB. This is ok from what I can tell from the forums.
I reinstalled syncthing on the desktop and reconfigured the sync to the server. After the initial scan, all drives except for one reported up to date.
Syncthing reported that there were a handful of files that were out of sync to the server (ie the server has “newer” versions of those files), and prompted an override.
I figured the files may have gotten corrupted, so I did a quick sha256sum against the files, both on the server and the desktop. Both were the same. Modtimes are also the same.
Are there other criteria Syncthing uses to determine if a file is different from a remote? Is there any debug flag I can set to see why syncthing thinks the files are different?
Given the SHA’s are the same, there isn’t a real problem here, but it’s odd that syncthing thinks that only a few of the files are different.
It’s hard to explain the technical part of it, but they are different because version vectors are different, there is no continuous shared lineage between the files, as they both come from different starting points logically (discovered on different devices), the fact content is the same does not matter, until they are given chance to sync, they notice the content is the same, merge the version vectors and become in sync, and start having a shared lineage.
Also, resetting the database is not actually safe, and can easily lead to data loss and garble your share with conflicts.
Also, resetting the database is not actually safe, and can easily lead to data loss and garble your share with conflicts.
In that case, wouldn’t it make more sense for the DB to be embedded into each .stfolder such that it’s tied closer to the files that they’re tracking? That would make moving drives/reinstalls safer as you don’t need to remember to back the syncthing database.
Also, other threads seem to imply deleting the DB is safer (ie How to backup Syncthing configuration and database - #3 by kluppy). Embedding the db in .stfolder would also solve the “delete the world if you add an empty folder” issue, since it wouldn’t be possible to have an empty folder AND a valid DB without someone actually deleting files.
Also you didn’t mention comparing permissions (or setting ignore permissions) - that might cause the discrepancy too.
Will check and get back to you, though I suspect they’re the same.