Feature Request: --update-whole-if-changed?

Jason Haar Jason.Haar at trimble.co.nz
Sun Mar 24 09:50:16 EST 2002

Quite a lot of the time I find rsync synchronizing a dir tree that contains
lots of compressed files (jpegs, tar.gz, etc). Rsyncing such a beast will
typically mean that if you are lucky, you'd end up finding the first n bytes
of a file is the same as the copy you have, but at some stage the next
checksum changes, and then every checksum check fails for the rest of the
file. I imagine that if I changed one byte in an archive, and then
compressed it, rsync would waste most of its time doing checksum tests when
there's really no chance it's ever going to find an identical block again.

What about an option "--update-whole-if-changed" whereby rsync flicks
between it's standard block-checking mode and whole-file mode IFF a checksum
fails? So rsync would carry on doing its block comparisons until one fails,
tehn copy everything done so far to a temp file, and carry on in whole-file
mode for the rest of that file. It could really save on CPU and network
cycles if you have a lot of compressed files to sync...

Just a thought...


Jason Haar

Information Security Manager
Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417

More information about the rsync mailing list