Problem with rsync --link-dest

Suddenly, rsync is not making sense - have used it for years w/o this problem. I installed the newest rsync just to make sure some bug had croppen in.


In this example, it is saying the link-dest does not exist, yet it does exist. I underlined the error message.


I'm sure it is a simple problem, but I can't spot it after too much time for me to spend on it. Here is a log of the session: I have an alias ll = ls -lF used here.


[219root@MacMini-13:44 ~]#mkdir rsync_trial

[220root@MacMini-13:44 ~]#mkdir rsync_trial/aa

[221root@MacMini-13:44 ~]#mkdir rsync_trial/bb

[222root@MacMini-13:44 ~]#touch rsync_trial/aa/test1

[223root@MacMini-13:44 ~]#rsync -a rsync_trial/aa rsync_trial/bb/back1

[224root@MacMini-13:45 ~]#touch rsync_trial/aa/test2

[225root@MacMini-13:45 ~]#rsync -a rsync_trial/aa --link-dest=rsync_trial/bb/back1 rsync_trial/bb/back2

--link-dest arg does not exist: rsync_trial/bb/back1

[226root@MacMini-13:46 ~]#rsync -a rsync_trial/aa --link-dest=./rsync_trial/bb/back1 rsync_trial/bb/back2

--link-dest arg does not exist: ./rsync_trial/bb/back1

[227root@MacMini-13:47 ~]#ll ./rsync_trial/bb/back1

total 0

drwxr-xr-x 3 root staff 102 Nov 5 13:44 aa/

[228root@MacMini-13:47 ~]#which rsync

/opt/local/bin/rsync

[229root@MacMini-13:48 ~]#rsync --version

rsync version 3.0.9 protocol version 30

Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.

Web site: http://rsync.samba.org/

...

[230root@MacMini-13:48 ~]#alias ll

ls -lF

Mac mini, OS X Mountain Lion (10.8.3)

Posted on Nov 5, 2013 10:58 AM

Reply
2 replies

Nov 9, 2013 12:26 PM in response to Boyd

But that still wasn't the problem. What works on my system is to put the total path name after "--link-dest=". Otherwise, it complains that it doesn't exist.


In my commands listed above, I should have put in this:


rsync -a --link-dest=/User/boyd/rsync_trial/bb/back1 rsync_trial/aa rsync_trial/bb/back2


which worked correctly, creating hard links to existing files in aa/ .

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Problem with rsync --link-dest

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.