Number of files transferred

Ph. Marek philipp.marek at bmlv.gv.at
Tue Apr 15 05:02:04 GMT 2008


Hello everybody,

I'm using rsync (debian 3.0.2-1) to test my pet projects for correctness; but 
now I've come across a bug (?) in rsync - it doesn't count transferred links, 
ie. "Number of files transferred:" is wrong.

See:

   # mkdir a b
   # ln -s /bin/ls a/link ; touch b/link
   # ls -la a/* b/*
   lrwxrwxrwx 1 flip flip 7 15. Apr 06:53 a/link -> /bin/ls
   -rw-r--r-- 1 flip flip 0 15. Apr 06:53 b/link

Now a test run shows that it'd send it, but doesn't count:
   # rsync -a -v --stats a/ b/ -n
   sending incremental file list
   link -> /bin/ls
   
   Number of files: 2
   Number of files transferred: 0
   Total file size: 7 bytes
   Total transferred file size: 0 bytes
   Literal data: 0 bytes
   Matched data: 0 bytes
   File list size: 51
   File list generation time: 0.005 seconds
   File list transfer time: 0.000 seconds
   Total bytes sent: 63
   Total bytes received: 15

   sent 63 bytes  received 15 bytes  156.00 bytes/sec
   total size is 7  speedup is 0.09 (DRY RUN)

Neither does a real run:
   # rsync -a -v --stats a/ b/
   sending incremental file list
   link -> /bin/ls

   Number of files: 2
   Number of files transferred: 0
   Total file size: 7 bytes
   Total transferred file size: 0 bytes
   Literal data: 0 bytes
   Matched data: 0 bytes
   File list size: 51
   File list generation time: 0.001 seconds
   File list transfer time: 0.000 seconds
   Total bytes sent: 63
   Total bytes received: 15

   sent 63 bytes  received 15 bytes  156.00 bytes/sec
   total size is 7  speedup is 0.09

But the symlink was sent:
   # ls -la a/* b/*
   lrwxrwxrwx 1 flip flip 7 15. Apr 06:53 a/link -> /bin/ls
   lrwxrwxrwx 1 flip flip 7 15. Apr 06:53 b/link -> /bin/ls


Now I'd like to ask whether that's a policy change (ie. will stay so), or if 
it's just a bug - in the first case I have to rewrite my test scripts, to 
test for changes in some other way.


Thank you.


Regards,

Phil


More information about the rsync mailing list