Home / GitHub Page

File system sync problem between Linux and Windows

I have a Windows 7 and Linux PCs and have been syncing them via file system sync on a FAT32 USB stick. Usually it works fine, however occassionally it quietly leaves the notes messed up.

After digging around I suspect it is due to the file timestamps that I think sync relies on.

I checked the modified time for a sync file on the USB according to both PCs and they report different times. The file was actually modified at 13:28 local time which is 02:28 UTC.

On Linux:
2019-11-08 13:28:04.000000000 +1100

On Windows:
2019-11-08 02:28:04.000000000 +1100

I’m not sure which is correct, or how to fix it yet (perhaps using NTFS on the USB stick), but could this difference be responsible for the erratic sync behaviour I have been seeing?

FAT32 shouldn’t be used to sync data because it’s not possible to get a reliable UTC timestamp from a file - https://stackoverflow.com/a/10069883/561309

NTFS should definitely work. You might want to give a try to ExFAT too, but check first that the timestamps are correct.

OK, I now formatted the USB stick with exFAT and the timestamps are correct on both OSes. Thanks.

For anyone else out there using filesystem sync, make sure you are using an appropriate file system for your sync folder, otherwise your syncing will not work reliably (unless ofcourse you live at UTC +0)

1 Like