Directory out of sync

So I have a shared folder between two computers where one is computer is “Send only” (PC A) and the other is “Receive only” (PC B). On PC A I can see in the “Remote Devices” list that PC B has a bunch of files/directories out of sync. I read somewhere that touching these files “touch -c /mnt/driveA/file-out-of-sync” could help with this. So I touched all of the files I found that were out of sync. This worked great, I didn’t have to transfer the files again (they are big), they just sort of worked themselves out by comparing hashes again or something?

Now, my current issue is that there were some directories in the list of out-of-sync items as well. I tried touching the directories as well with the same command but while the date does change in the filesystem (as shown by ls), syncthing doesn’t seem to detect and resync these.

In syncthing, the touched directories still show up with: Path, Size, Mod. Time, Mod. Device dirA, 128B, 2017-07-21 00:59:26,

But this specific directory when ls:ed, shows Jan 4th 2021.

I’ve tried to resync the folders in syncthing but it doesn’t help. Both computers are running Debian 10 and any new files I add are transferred without issues. Both harddrives in both computers are ext4 formatted.

The only setting that is changed on the folder is the “Send Only” and “Receive Only” settings. No ignore patterns etc.

What can I do to fix this?

Thanks!

Hi @lsync, welcome to Syncthing!
Which version are you using? Please post screenshots from both sides.

Hi, Both computers use v1.12.0 but this has been an issue for many versions (this has probably happened because PC A was previously running Windows 8.1 and had NTFS drives. So I reformatted them and then transferred the files back from PC B and then this eventually happened (it did work without this issue for a while though)). I’ve been using syncthing for many years without this issue.

Here are some screenshots to try and illustrate. The ls output is of the third path from the bottom from the “Out of Sync Items” list from the syncthing dashboard (so, previously, this directory had a mod. time of 2017-07-19 11:17:37 and now I’ve touched it to make it January 4th 2021 but syncthing doesn’t detect this change (I’ve forced rescans and automatic once have happened plenty of times, I’ve also restarted syncthing). pcA_folder_list

PC A folder

PC A out-of-sync list for the same folder

pcA_RemoteDeviceList_pcB

PC A remote devices list

PC A ls output from CLI

PC B syncthing dashboard

I do want to point out that the files inside the folder is updated but the directories doesn’t seem to “sync” (there isn’t really anything different between them except the mod. date right now. It isn’t that big of an issue, mostly just an annoyance since it would be nice to see that it was fully up to date and not have a bunch of folders “in the way”.

Something that I just tried was to just change the name of the directory and syncthing does discover this and that specific directory is now gone from the out-of-sync list. So it’s a solution but quite a cumbersome one since I’ve got 350 more directories spread out in the filesystem to individually rename slightly for syncthing to resync them.

I also went ahead and upgraded both computers to v1.12.1 that was released yesterday but the problem remains (which was expected since this has been an issue for a long time and the release notes didn’t mention anything about it).

Please read

and check if this is related to your problem

I don’t think so. These seem to be either solved by restarting syncthing, which isn’t a solution for me or it’s an issue that happened from v1.11 to v1.12 (if I understood correctly).

My issue has been present for much longer than this, probably like 1.8 or something (I don’t actually know when it happened but it’s not a recent thing). I’ve just not done anything about it since I was able to verify that the files actually existed on both computers (they are mostly static files that are never changed) by hashing the files. I had some time now to try and resolve it which is why I’m writing now.

I think it’s more to do with syncthing not detecting that the modified time has been changed of a directory. When I changed the modified time of the files it detected it and the files were removed from the out-of-sync list. The directories however seem do not seem to be detected.

I don’t know if this is a plausible theory since I’m a bit unsure of how syncthing works in that regard. Maybe it’s not a bug at all because syncthing doesn’t care to look at the modified date/time of directories for some reason?

Did you try -reset-deltas as described in the links?

I’m sorry, I must have misunderstood. I read it and saw that it didn’t help for Alex. I did try it now and that does seem to have done it for me though! Thank you for the help! :slight_smile:

2 Likes