[Dirvish] [patch] local to remote backup; dirvish push

Eric Wilhelm scratchcomputing at gmail.com
Tue Aug 29 20:59:35 UTC 2006


# from Robert Siemer
# on Monday 28 August 2006 06:19 pm:

>quote from the rsync man page:
>
>       --link-dest=DIR
>              ...
>
>              If DIR is a relative path,  it  is  relative  to  the
>              destination directory.
...
>I run rsync 2.6.8 ... and 2.6.4 ... The man page quote is valid 
>for both version. For what 
>version does your information apply (to isolate the version
> requirement for this issue)?

I've got 2.6.2 and 2.6.5 handy.

2.6.2 says:
  --link-dest=DIR
    This option behaves like --compare-dest but  also  will  create
    hard  links from DIR to the destination directory for unchanged
    files.  Files with changed ownership or permissions will not be
    linked.   Like  --compare-dest if DIR is a relative path, it is
    relative to the  destination  directory  (which  changes  in  a
    recursive transfer).

2.6.5 says:
	... If  DIR  is  a relative path, it is relative to the destination
    directory. ...

(e.g. 2.6.5 has omitted the "(which changes in a recursive transfer)" 
qualification)

But, I'm seeing the same behavior in both 2.6.2 and 2.6.5.  Did 2.6.8 
change this?  Have you check the link counts?  Try the following:

  $ mkdir /tmp/rsync_test

  $ cd /tmp/rsync_test 

  $ mkdir orig/foo/bar -p

  $ echo "foo" > orig/foo/bar/test

  $ rsync -av orig/ 1
    building file list ... done
    created directory 1
    ./
    foo/
    foo/bar/
    foo/bar/test

  $ rsync -av --link-dest 1 orig/ 2
    building file list ... done
    created directory 2
    ./
    foo/
    foo/bar/
    foo/bar/test

  $ stat -c %h 2/foo/bar/test
    1

It did not link!

  $ rsync -av --link-dest /tmp/rsync_test/2 orig/ 3
    building file list ... done
    created directory 3
    ./
    foo/
    foo/bar/

  $ stat -c %h 3/foo/bar/test
    2

Now we have a link.  Seems to require a path that starts with / AFAICT.

--Eric
-- 
Chicken farmer's observation:  Clunk is the past tense of cluck.
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the Dirvish mailing list