link-dest storage saving on backup server not on usb hard drive

Matt McCutchen matt at mattmccutchen.net
Wed Jun 25 21:07:07 GMT 2008


On Wed, 2008-06-25 at 12:50 -0700, fglos wrote:
> I have setup rsync to backup another linux computer with the link-dest option
> and realized storage savings.  1st backup is 31gb, daily backups only take
> approx 4gb. But when I rsync with link-dest to usb external drive all
> backups take up 31gb.  Following is 1st the one that works and 2nd with no
> storage savings.  Any ideas?  Thanks, Frank

> rsync --exclude-from=/root/bkup_excludes -avz --delete -e "ssh -i /root/cron/aebkup-rsync-key" --link-dest=/aeprodbk/current root at aeprod:/ /aeprodbk/$d >>$d.log

> rsync --exclude-from=/root/bkup_excludes -av --delete --link-dest=$dsk/current /aeprodbk/$d $dsk >> /usb$d.log

The trouble is that on the second run, the file-list paths of the files
begin with $d (since the source lacks a trailing slash), so the
--link-dest option is looking for previous files under $dsk/current/$d .
To fix this, add a trailing slash and adjust the destination
correspondingly:

rsync --exclude-from=/root/bkup_excludes -av --delete --link-dest=$dsk/current /aeprodbk/$d/ $dsk/$d >> /usb$d.log

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080625/2561962c/attachment.bin


More information about the rsync mailing list