Some files not logged when using --compare-dest. Bug?

Vidar Madsen vidarino at gmail.com
Thu Mar 31 12:34:14 GMT 2005


Hi again.

I just spotted another peculiarity when inspecting the rsync log. When
using --compare-dest, source files that have permissions that differ
from the "comparables" are not logged, unless you're using -i.

Here's a testing session:

  $ ls -lR
  .:
  total 12
  drwxr-xr-x  2 vidar users 4096 2005-03-31 14:16 cmp/
  drwxr-xr-x  2 vidar users 4096 2005-03-31 14:23 dst/
  drwxr-xr-x  2 vidar users 4096 2005-03-31 14:16 src/
  
  ./cmp:
  total 4
  -rwxr-xr-x  1 vidar users 17 2005-03-31 14:16 slackware-version*
  
  ./dst:
  total 0
  
  ./src:
  total 4
  -rw-r--r--  1 vidar users 17 2005-03-31 14:16 slackware-version

Note the permissions; the cmp file has been chmodded a+x.

  $ rsync -av --compare-dest="../cmp" src/ dst/ 
  building file list ... done
  ./

  sent 115 bytes  received 32 bytes  294.00 bytes/sec
  total size is 17  speedup is 0.12
  $ ls -l dst
  total 4
  -rw-r--r--  1 vidar users 17 2005-03-31 14:16 slackware-version

So the file was copied despite not being listed

  $ rm dst/slackware-version 
  $ rsync -avi --compare-dest="../cmp" src/ dst/ 
  building file list ... done
  .d..t.... ./
  .f...p... slackware-version
  
  sent 115 bytes  received 32 bytes  294.00 bytes/sec
  total size is 17  speedup is 0.12
  $ 

The same behaviour can be seen when using --log-format instead of -v;
if there's an "%i" present, everything is logged correctly, but
without, files with different permissions are silently left out.

Vidar


More information about the rsync mailing list