--link-dest not working on remote server (running daemon)

Sam Holton samholton at gmail.com
Mon Feb 8 20:33:40 UTC 2016


I have read through the list of previous issues regarding this issue but
haven't been able to resolve mine. I apologize in advance for the long text
and am probably doing some simple typo. I have two servers in my setup:

*Server 1*
Doing rsync with --link-dest daily and working as expected. I'm getting the
hard links in the new daily directories.

*Server 2*
Running rsync daemon mode with following config

   path = /media/external/backup/
   comment = Offsite backup
   read only = no
   hosts allow =
   auth users = backup
   secrets file = /etc/rsyncd.scrt
   uid = 0
   gid = 0

*My Goal*
Server 1 has been running for several months now so it has several months
of daily backups. I was able to do an initial sync to server 2 using -H
option to keep my hardlink structure. That worked fine and my original plan
was to just run the same rsync with -H after the daily backup was complete
to keep both in sync. But that turned out to be very slow building the
incremental file list as I'm guessing it scanned all files for each daily
backup (even though they were hard lnked).

So my next plan was to just sync that latest daily backup from server 1 to
server 2 and use the --link-dest option on server 2 to link it to the
previous day.

*The Problem*
This is the command I'm troubleshooting right now

rsync -a -v -n -i --delete --link-dest=/backup-2016-02-01-0100
/media/external/backup/backup-2016-02-02-0100 backup at

It seems to be sending all files as new files (i.e. not picking up the
link-dest option). I've tried using no slash at the beginning of link-dest,
tried using ./ tried full path. etc.

Here is a snippet of the output from server 1 which is running the command:

DC Air and Space Museum/IMGP0906.JPG

On server 2 there is no backup-2016-02-02-0100 directory. However, the
link-dest option I'm using has the file on server 2:

-rw------- 147 www-data www-data 4454193 Jan 20  2007
DC Air and Space Museum/IMGP0906.JPG

Output of same file from server 1

-rw------- 151 www-data www-data 4454193 Jan 20  2007
DC Air and Space Museum/IMGP0906.JPG

If I manually create the copy of server 2 first (cp -al
backup-2016-02-01-0100 backup-2016-02-02-0100) and then run rsync without
the --link-dest option I get the expected results. Only the files that
changed or were removed/added are transferred.

Also I tried running the actual transfer without -n and it is indeed
transferring all the old files.

Any help is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20160208/b9d6c789/attachment.html>

More information about the rsync mailing list