When I do rsync --dry-run -rv
, rsync is listing files that are identical except for their timestamps.
My understanding was that with just these flags (which don't really change the comparison behavior), rsync would see the differing timestamps, check the file sizes (which are, of course, the same), and then finally do a checksum on the files, before flagging them for update. If the checksums match up, even if the timestamps are different, the file would not be updated.
What am I misunderstanding?
It seems like you understand things just fine with one exception. When you are in
--dry-run
mode rsync doesn't compute the checksums so you might see files that would not be transferred after the checksum is done.Because the timestamp is different rsync knows that it will be updated, but since it is in dry-run mode it won't be able to report that the only thing that needs to be updated is the timestamp.
I don't know how to force a checksum in dry-run mode.
Since it sounds like you are trying to force a comparison of a local and remote set of synchronized files, then you might want to try something like this instead? (sha256deep can be replaced with sha1 or md5 deep if you want more speed).
That command would calculate the md5 checksum for each file both locally and remotely. The two lists are sorted on the path, and diff will show you and differences in the checksums.