Since you are not copying the metadata (which you would do if you used --archive
or -a
instead of just -r
), the metadata (timestamps, ownerships etc.) will be different between the copy and the original. When you run rsync
again, since the timestamps are different, the file is copied again.
So, you would instead want to use
rsync -ai --delete /src/path/ /dest/path
I'm using -i
(--itemize-changes
) since it also tells me why a file was copied.
Also note that when you do a local copy with rsync
, it will not use its delta algorithm, but will instead behave as if --whole-file
(or -W
) was specified. This is because the delta algorithm is assumed to only be faster than a whole file transfer when transferring over a network. When using the delta algorithm, the whole file would need to be read and checksummed on both the source and target systems. Doing this locally seems a bit wasteful, so the file is just copied in full instead.