rsync suggestion

Alvin Austin aan at crlogic.com
Wed Sep 25 16:14:01 EST 2002


When mirroring a directory containing versioned files with rsync, it 
seems that extra data is being transferred unnecessarily when a new 
version of the file is put in the directory.

For instance, a directory contains files:

    someprog-3.7-beta1.ext   
    otherprog-9.2.ext
    ...

and this is mirrored to another system with rsync.  Then the site 
updates someprog-3.7-beta1.ext to someprog-3.7-beta2.ext (or other 
similar name) and deletes the someprog-3.7-beta1.ext .  If you are 
rsyncing with the --delete option, the old file will be scheduled to be 
deleted and the new one copied over in its place without doing a 
difference test between what are really two similar versions of the same 
program.

Could rsync compare the list of files to be deleted and the ones that 
will be added, and match files being deleted that are "similar enough" 
to the new files being created (filename starts/ends with the same 
characters, size is within 10%, replacement has a newer date, etc), and 
then use that as a basis for the download block comparison?

Currently if you want to do this (for instance with large .iso files), 
you have to manually check to see what the new name would be, rename the 
current file that you have, and then run rsync, in order to see savings 
in the amount of data transferred.

Just a suggestion.  Keep up the good work!

Alvin







More information about the rsync mailing list