[clug] rsync --link-dest (Was: backup script?)

steve jenkin sjenkin at canb.auug.org.au
Sun Aug 31 04:38:32 GMT 2008


Chris Smart wrote on 30/8/08 10:10 AM:

> Hey Paul,
> 
> I like to use rsync and hardlinks. That might work for you too. One
> initial backup, the size of your data, then incrementals thereafter.
> Your backups are live this way too, so you can share them out
> read-only to a network and people can grab their latest files without
> bothering you.

<snip>

> Backup script (dailycheck):
> http://christophersmart.com/files/dailycheck
> 
> Exclude file (exclude):
> http://christophersmart.com/files/exclude

<snip>

This article by Mike Rubel started the 'rsnapshot' thing...

I'm following the recipe for "--linkdest=", can anyone see what I'm
doing wrong??

Anyone make this work?? [I believe CSIT at ANU wrote link-dest & use it]

In the piece MR talks about once using 'cp -al' and now using '--link-dest'
<http://www.mikerubel.org/computers/rsync_snapshots/#Incremental>

[Look for "Putting it all together"]

=====================================
OLD:
rm -rf backup.3
mv backup.2 backup.3
mv backup.1 backup.2
cp -al backup.0 backup.1
rsync -a --delete source_directory/  backup.0/

NEW:
mv backup.0 backup.1
rsync -a --delete --link-dest=../backup.1 source_directory/  backup.0/
=====================================


I've got a version working with "cp -al", but my tests with
'--link-dest' don't work as I expect.
rsync seems to think everything is changed when nothing has...
[like it was ignoring the reference dir]

I've created the dir /backup/host/2008/08/31 using:
  cd /backup/host/2008/08
  cp -al 30/ 31/
  rsync -var --delete host:/backup/host/ ./31

'link-dest' trial:
  cd /backup/host/2008/08
  rsync -var --delete --link-dest=./31 host:/backup/host/ ./31-1

This trial seems to decide every file has changed.
If I rerun the 'cp -al;rsync', it does what I expect - decides nothing
has changed (which is correct - the source tree is updated once a day)...

Any help/comment/examples gratefully received :-)


# rsync --version
rsync  version 2.6.8  protocol version 29
Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, ACLs, xattrs,
symlinks, batchfiles,
              inplace, IPv6, 64-bit system inums, 64-bit internal inums


<snip>

> Cheers,
> -c


-- 
Steve Jenkin, Info Tech, Systems and Design Specialist.
0412 786 915 (+61 412 786 915)
PO Box 48, Kippax ACT 2615, AUSTRALIA

sjenkin at canb.auug.org.au http://members.tip.net.au/~sjenkin


More information about the linux mailing list