rsync --compare-dest creates all dirs and symlinks

Dirk Schenkewitz schenkewitz at docomolab-euro.com
Tue Oct 18 18:07:56 GMT 2005


Hi all,

Being a rsync newbie, I wanted to use rsync for frequent backups that
should only contain the changes.

First I made copy of the important partition of the remote PC ("gany")
using dd and mounted the resulting local file using a loop device under
/mnt/gany.

Then I tried:

rsync -Haziv --compare-dest=/mnt/gany/lib --compare-dest=/data/A/gany.1 \
  root at gany:/lib/ /data/A/gany.1


I expected that rsync check everything and then finished without having
anything created, because there is no change between the loop-mounted
filesystem and the actual filesystem on "gany". Or at least create nothing
more than /data/A/gany.1/lib.

What happens is that rsync creates the whole tree of directories below
/data/A/gany.1/lib and also created all symlinks within that tree.

My Questions:
- Is there a way to avoid that?
(I also tried something similar with --link-dest but that produced
rather similar results.)

- If there is no way to avoid creating the directory tree and the
symbolic links:
-- is there any better way to find out what is REALLY different between
the loop-mounted filesystem and the newly created one, other than
fiddling with "diff -r" and some processing for the symbolic links?
(If there would a way to find out what's really new, I could just let
it make the dir tree, then do the find-really-new-processing and
delete everything that equally exists within the loop-mounted
filesystem.)

Sorry if this has been asked before. In that case, could someone give
me a pointer/link to the answer(s). Any help is very much appreciated!

Best regards
   Dirk






More information about the rsync mailing list