Syncthing syncing files that already exist.

I recently made a sync folder between my PC and my phone (Android). the folder mostly consists of audio files (.mp3 and .flac). the folder is essentially the same on both devices, as I have copied it directly from my phone’s SD card to my PC except for a few files, about 10 or so that I added to the version of the folder on my phone. It’s set to send only on my phone. the problem so far is that it keeps detecting a bunch of the files as out of sync and creating copies with “.sync-conflict-(date)-(time)”. So far it has detected half of them as out of sync, about 450 files and it’s still syncing at 55%. does that mean the content isn’t identical? if so I’m not sure why that would be the case, since they are the same files.

PS: I’m sorry if it’s a stupid question I have only been using Syncthing for a day.

It’s not a stupid question and there are plenty of earlier posts asking the same thing with an identical or slightly different setup…

One option is to initially set both the PC and phone to “Send & Receive” until Syncthing finishes merging the collection of files and folders – i.e. what’s on the PC but not on the phone will be copied to the phone and vice versa. If there aren’t a lot of conflicts, it won’t take long to manually prune them.

Alternatively, if “the folder is essentially the same on both devices” and you feel confident that the phone has everything you want, set Syncthing on the phone to “Send Only” and set the PC to “Receive Only” so that whatever is on the phone supersedes the files on the PC.

The longer answer is that SD cards used with phones are most often formatted with a FAT32 filesystem because it’s still the most portable and one of the simplest to implement (i.e. wide chipset and software support). In contrast, if your PC is running Windows, the internal drive is most likely a NTFS volume.

A big wrinkle is that time resolution varies quite a lot between different filesystems. For the last modified time stamp, FAT32 has an accuracy of 2 seconds while NTFS is 100ns (nanosecond = 1 billionth of a second). Syncthing has a modTimeWindowS setting that helps reduce the chances of time resolution differences causing conflicts but rounding errors when the OS sets a timestamp can affect the results.

So Syncthing reporting conflicts doesn’t necessarily mean that the conflicting files aren’t identical. It just means that Syncthing is erring on the side of caution.

1 Like

Thank you SM. I’m gonna try it and hope it works.

modTimeWindowS is set to 2 automatically on Android (universally, unless the filesystem is detected as ext, which is rare), so normally there should be no need to set it manually. In addition, pure timestamp differences should only make Syncthing update the timestamp to the newest one with no conflicts created in the process.

I think you should take out one of those files that Syncthing has created conflicted copies for and simply compare its hash and content (even just manually) with the other side.