Sync timestamps on otherwise identical files

Hello all,

I’ve got a question related to how syncthings logic works when it comes to syncing timestamps. My situation is as follows:

I’ve copied approximately 500 GB of data to a remote machine via SFTP (over a long period of time). Only now, much later, I realized that my SFTP client did not sync the file modification dates… Oh well. I would like to fix this, without retransferring everything. As the SFTP client apparently can’t do this, I thought about using syncthing for this, as it does sync timestamps.

I plan on doing the following:

I’m currently setting up a replica folder on my local machine, that has the exact same files as the remote, but with correct timestamps (as I still have the old files with correct dates here, I just need to reorganize them a bit to match the remote FS layout)

I would then share that folder send-only with the remote machine, using syncthing. The files are fully hash-identical, which syncthing should notice after scanning. I want then that syncthing overwrites the newer file modification date with the older file modification date. Can I force this, e.g by doing some magic with Override changes on the send-only folder?

I’m not really familiar how syncthings date logic works when it involves files that are hash-identical but differ in mtime. How does syncthing handle this?

Different mtimes is enough to warrant a “change”, so you should get override changes button, and setting the correct side as send only should do the right thing.

We ignore mtimes of folders tho, so that won’t do anything.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.