rsync's manpage states:

Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time. Any changes in the other preserved attributes (as requested by options) are made on the destination file directly when the quick check indicates that the file's data does not need to be updated.

So for a file to be skipped the modification time has to be the same in source and destination. But since --times is off by default, the destination files will get the time of the sync as their modification time, causing them to be transferred over and over again.

Especially the fact that that paragraph says (emphasis mine):

... Any changes in the other preserved attributes ...

makes it appear (to me) as if the modification time was already a preserved attribute by default, but in my experiment I found otherwise.

What am I missing?


"(as requested by options)"

Yes, the word "other" in the sentence makes your interpretation possible, but I think that the actual situation is that there are no preserved attributes by default, and that these need to be explicitly requested by options.

rsync works very much like cp in this regard, which also does not preserve timestamps or ownerships on files by default. Both preserves permissions though.

  • Indeed, I cannot come up with a better default that would keep the similarity with cp. – AndreKR Jan 12 at 1:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.