modification times questions

Guillaume Outters guillaume-rsync at outters.eu
Mon Apr 10 10:08:45 UTC 2017


Le 2017-04-07 21:08, Kevin a écrit :

> On 04/07/2017 03:07 PM, McDowell, Blake wrote:
> 
>> I run --times when I use rsync […] but the times do not transfer over 
>> […]
> 
> I have never seen rsync do that.  What exactly are you doing?

I have seen such a behaviour when trying to rsync to a UDF volume 
mounted on a Mac.

It was due to rsync's receiver doing the file renamings from their 
temporary (transfer) name to the real one after having done all other 
operations, including having modified the timestamps; turned out that 
UDF implementation in Darwin sees name changes as file changes, and as 
such, renaming the file modified the mtime.

Perhaps doing --inplace can prevent this behaviour (if, Blake, you have 
the same).

I opted for patching rsync:
http://tmp.outters.eu/rsync.modtime_after_rename.patch
On the very first renamed file, the patched rsync rereads the file's 
mtime, and if it finds it doesn't match the one set, it switches to the 
mtime-after-rename behaviour (for the rest of the transfer).

-- 
Guillaume



More information about the rsync mailing list