[Detecting renames]

Wayne Davison
Fri, 05 Oct 2007 19:04:36 -0000

On Thu, Oct 04, 2007 at 01:57:22PM -0600, Frank Thomas
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.

For the next "feature release" of rsync after 3.0.0, I'm imagining
adding support for a database API that would allow extra information
about files to be maintained and used (completely optional, of course).
In the scenario that you described, this new rsync would be run using a
DB cache and the --checksum option, which would lookup files on the
sending side by their inode + size + mtime + ctime (making the checksum
lookup efficient).  The receiving side would lookup incoming files based
on its checksum + size + mtime + ctime in order to find a local file
that it could use for hard-linking, copying, and/or renaming.  In the
meantime, the only rsync solution is the detect-renamed patch that Matt
mentioned.

..wayne..