Syncing moved files

Matt McCutchen hashproduct+rsync at
Fri Sep 22 23:17:02 GMT 2006

On 9/22/06, Martin Gadbois <martin.gadbois at> wrote:
> But rsync does not know that I moved an identical picture from tmp/ to
> Vacations/, it transfers the whole file, and deletes the one that was in
> tmp/, even though a local move might have done it.
> Is there a way that rsync could, for all known files, sync paths instead
> of file content whenever local and remote files are identical (using
> sha1 or md5)?

The experimental --detect-renamed option provided by the patch
"patches/detect-renamed.diff" will make rsync incrementally transfer
each moved file using the receiver's unmoved file as the basis.  That
will cut out almost all of the network traffic but will not reduce
disk I/O.  I suppose you want the receiver to skip the transfer
entirely and just move the file if --checksum is on and the checksums
match.  The patch doesn't have this behavior yet.  Someone who
understands the patch better than I do should add it.

--fuzzy and --detect-renamed are very similar; they just consider
different sets of potential basis files.  Perhaps their
implementations should be merged.


More information about the rsync mailing list