--compare-dest; I'm missing the boat

Harry Putnam reader at newsguy.com
Thu Jan 15 22:54:15 GMT 2009

I must be seriously misunderstanding the man page coverage of
--compre-dest.  My take was that if a file  in compare-dest=dir
matches a file in SOURCE/ then it won't be transferred to DEST/.

I tried this test. (d1 has single files and 2 subdir with files)

   cp -a d1 d1a

   mkdir d2

rsync -avv --compare-dest="./d1a" d1/ d2/

d1a is carbon copy of d1 but still every last file in d1 is copied to

>From man rsync at the explanation of compare-dest:

  . . . . . . . . . . . . . . . . . .If a file is found in DIR
  that is identical to the sender's file, the file will NOT be
  transferred to the destination directory.  This is useful for
  creating a sparse backup of just files that have changed from an
  earlier backup.

Where am I stripping a gear on this?

More information about the rsync mailing list