[Detecting renames]
Matt McCutchen
hashproduct+rsync at gmail.com
Fri Oct 5 01:47:36 GMT 2007
On 10/4/07, Frank Thomas <fthomas at radiology.ca> wrote:
> This action is the simplest method of performing an rsync, but it would be
> nice to have rsync to be intelligent enough to recognize a name change but
> not an inode change on the source.
The --detect-renamed option provided by the patch
"patches/detect-renamed.diff" in the rsync source package would help
in the scenario you described. It differs in two ways from what you
are proposing:
(1) Since rsync is stateless, --detect-renamed has no way of tracking
inode numbers. Thus, it just pairs similar-looking deletions and
creations according to the quick check criteria (defaulting to size
and mtime).
(2) --detect-renamed works at the level of individual regular files,
so in your scenario it would detect some large number of file renames
rather than a directory name.
Matt
More information about the rsync
mailing list