New rsync option checksum-path

Ruy Exel r at exel.com.br
Mon Mar 10 16:37:25 GMT 2008


This is a suggestion for adding to rsync an option "--checksum-path=PROGRAM".

Once this option is given, provided it is accompained by option
"--checksum", both the receiving and sending side of rsync would
compute checksums calling PROGRAM, instead of the usual checksum
program.

Why is this usefull?  Suppose I have two collections of MP3 files at
different locations which I want to upate.  Suppose also that for some
reason the testing of modtime is not efficient for distinguishing
changeg files.  Recall that changes to ID3 tags inside MP3 files do
not change filesizes, and hence neither filesize is a good criteria
for identifying changes.

Suspecting that the changes were made only to ID3 tags, a very common
situation, one could write a shell script, say SHORTSUM, which would
calculate a checksum only on the first 10K bytes, for example, where
ID3 tags reside.

Using

  rsync -av --checksum-path=SHORSUM --checksum /LOCAL-MP3-DIRECTORY/
SERVER:/REMOTE-MP3-DIRECTORY/

would therefore save a lot of processing power.

I am aware that rsync was designed in a way to dispense with previous
knowledge of how files are structured.  However, a simple change as
proposed would allow users to custumize rsync based on such knowledge.

Sincerely, Ruy Exel


More information about the rsync mailing list