Can someone explain why this is happening? Is it a bug?
I created a new shared folder on Node 1 (Windows 8.1) with about 64,000 files. The folder was set as a Folder Master. I then set up Syncthing on a Node 2 (a Windows server) and added the shared folder from Node 1. Since the new folder on Node 2 was empty, I allowed it to copy all the files from Node 1 until both were in sync.
Now, when I look at the GUI for Node 1 (the master), it says 10 files are “out of sync.” The 10 files appear to be completely random. No files were changed on either node. No permissions were changed. The nodes just finished syncing a minute ago and they’re both Windows.
I know I can just “Override” the changes, but why is this happening? I makes me worried that there may be a serious bug in the sync process.
I did have to restart Syncthing a few times while it was busy syncing because I added new folders to be shared, changed the rescan interval, etc. Is it possible that restarting Syncthing while it’s in the middle of copying a file could cause that particular file to appear newer on the receiving node?
By the way – I did the same thing with a different Master folder on another server (Node 3) that I synced to the same Node 2 as above. The same thing happened, but only 2 files were out of sync this time. Both machines were Windows Server 2012.
One more note: When I compared a few of the files that were “out of sync” to the versions on the receiving node, I couldn’t see any difference. They appeared to be identical, with identical timestamps, and not corrupted.
“Usually” this is because of some minor change, such as the timestamp being different. Sometimes and indexing process or something can add metadata, thus touching the modification time even if the file is otherwise unchanged?
The disks you are storing stuff on, particularly “node 2”, what filesystem is that? NTFS or (v)FAT? There might be a bug here with FAT timestamps specifically.
When I did the sync from Node 3 (master) to Node 2, I believe I restarted the Syncthing twice on Node 3 to apply setting changes while the sync process was still going on. When it finished syncing there happened to be exactly 2 files out of sync. That’s why I suspect some bug may be causing the file that is currently copying during a restart to get marked as newer on the receiving node. Is that possible?
Well, yes, it’s possible now that I think more about it. There’s a batch delay from when a file is actually completely synced on disk until the database is updated with the info. If you restart Syncthing in that interval it’ll discover the file as a new file on disk and announce it to the cluster, which shows up as “out of sync” on the master node.
If it weren’t a master node, it’d accept the change, notice that the file contents and metadata are in fact identical, and mark it done. As it is, it’s blocked from looking at the change at an earlier stage so it doesn’t notice that there is in fact no difference.
I don’t think they are related. The “out of sync” issue actually happened a few days ago, before I had any crashes. I hit “Override Changes” and everything then synced properly and then continued running fine for about 24 hours. Then the first crash happened.
This issue is still happening fairly often. Did it ever get added to the bug list?
I have Syncthing set up on 4 Windows nodes now. Three of them are laptops that have their own Master folder that syncs to the 4th node that is basically a backup machine. The 4th node never changes any files. There is nothing changing the timestamps or any other meta data. It’s just a basic Windows server with nothing else installed. The indexing service is not installed either. All nodes are NTFS.
But each of the master nodes still occasionally shows files being “out of sync,” requiring the “Override” button to be clicked.
As I mentioned, the problem seems to happen most often when Syncthing gets restarted, but that happens fairly often since the laptops are frequently turned off or put in “sleep” mode. The number of files affected varies. Sometimes it’s only a couple. Sometimes it’s 20 or more.
It’s also worth noting that it happens to deleted files as well. For example, on one Master I deleted a folder with a few thousand files. Some of the files deletions were then propagated to the non-master node, but some were not. Those that weren’t showed up as “out of sync”. Once I clicked Override those remaining files were deleted on the non-master as well.
The biggest problem is that I have no way of knowing when it happens. So I have to check each node periodically to see if I need to click the “Override” button. That’s really impractical since I need to have all files backed up in near real time.
One option might be to add an “Always Override” option for Master folders that will cause it to automatically override any changes on non-master nodes. It doesn’t really fix the root cause of the problem, but it’s an acceptable workaround and it would be a useful feature to have anyway.
I started using syncthing for a few days, and I am trying sync between my phone and pc. I think the pc is in NTFS and the sd card on android is in exFAT. I am not sure if that’s a bug mentioned previously. But I get out of sync in the master folder in the pc side every now and then.
I have a large database that I want to sync overnight, and so far, everytime I check in the morning, there are too many files didn’t get sync because of the out of sync.
Popping by to say that I’ve had this issue a long time between Linux and Android sharing a bunch of MP3 files (10 MP3s and 2 text files). All the way from 0.11.x to 0.13.5
Master folder on Linux is Out of Sync very often but not in any recognizable pattern or way. My suspicion has been that Androids Media scanner is doing something to the files now and then. So I’ve wished there was some kind of ‘force’, ‘über’ or as suggested ‘Always Override’ Master folder option to tick off that could force changes through. Maybe hidden with a fat warning sign above it in the advanced options somewhere