On Tue, Jul 18, 2000 at 12:17:40AM +1000, Dean Scothern wrote:
> Hello,
> 
> I've been using --compare-dest=DIR to do incremental mirroring . I
> discovered a few broken files so I tried --checksum and| or
> --ignore-times and alas I discovered that I was suddenly doing full
> mirrors.
> 
> ie:
> ok:
> rsync -av  --compare-dest=/backup/full/sandham/_home/dino /home/dino/
> dino
> not ok:
> rsync -av  --checksum --compare-dest=/backup/full/sandham/_home/dino
> /home/dino/ dino
> or:
> rsync -av  --ignore-times --compare-dest=/backup/full/sandham/_home/dino
> /home/dino/ dino
> 
> Are these two options compatible with --compare-dest?
> If not what should I do, (please) ?


The --compare-dest man page item documents this behavior for -I at least
(which is equivalent to --ignore-times) so therefore it is a feature, not a
bug :-(     That also makes sense to me, because ignoring the timestamps
means that rsync looks into every file.   On the other hand, --checksum
should make it skip doing the incremental algorithm on files whose
checksums match so I think it would make sense for --compare-dest to do as
you expect with that; I'm not surprised that it doesn't, however.  Yes,
the skip_file() function at the top of generator.c needs to prepend
compare_dest to fname if fname doesn't exist and compare_dest is set.
Could you try to code that up, test it, and send in a patch?  See the
other uses of compare_dest in generator.c and receiver.c for examples.

- Dave Dykstra

Reply via email to