File rename detection?
jw at pegasys.ws
Thu Jan 29 01:34:53 GMT 2004
On Wed, Jan 28, 2004 at 05:12:04PM -0800, jw schultz wrote:
> On Thu, Jan 29, 2004 at 11:42:12AM +1100, Donovan Baarda wrote:
> > On Thu, 2004-01-29 at 06:27, jw schultz wrote:
> > > On Wed, Jan 28, 2004 at 09:06:52PM +0300, ??????? ???????? wrote:
> > > > Hello!
> > > >
> > > > As I was found rsync do not detect file renaming. If I just copy my
> > > > backup.0.tgz (many Mbytes in size having it's md5) to backup.1.tgz
> > > > (which will be equial in size and md5) it will be the same file
> > > > in fact...
> > > >
> > > > Rsync will delete old file (backup.0.tgz) on the receiving side and
> > > > download new one (backup.1.tgz). I do not think there are any
> > > > difficulties to detect this situation and follow the natural way:
> > > > just rename the file on the receiving side.
> > > >
> In most cases it is reasonable to adjust file naming schemes
> to use less ephemeral names thereby avoiding the problem
Overstated and misdirected, sorry.
Situations where blah.0 gets renamed to blah.1 seldom
benefit from rename detection anyway because the cascading
renames just make room for new files reusing the old names.
Short of prioritizing file checksums ahead of names for
finding unchanged files that is simply not going to be
doable. Rsync is only one reason why cascading renames are
less than desireable. Much better to use names with greater
semantic content that remain fixed for the life of the
On the other hand where rename detection really does buy
something is when directories are moved, renamed or even
copied and you want to not have to send whole trees as
though they were new. No file naming scheme could save you
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync