I use the following option to synchronize to a btrs remote server.
rsync -aRrzu --inplace --delete -vv --files-from XXX
When the rsync fail (Ctr+C, very long network outage, ...) file that being transferred has its modification time set to the current time on the remote server and not the source modification time. Modification time is correctly set for files which transfer succeed.
As a consequence, as I am using
--inplace (which implies
--partial), the incomplete remote file is not deleted and appears to be newer than the source. So that re-running rsync does not synchronize this incomplete file.
Is there any way to enforce mtime to be set before transferring files ?
--checksum may solve the issue, but has I deal with very large file (20GB), I would like to avoid this.