Backups with rsync [Was: Is my root partition dying?]
Trent W. Buck
trentbuck at gmail.com
Mon Dec 21 11:25:29 AEDT 2015
Erik Christiansen via luv-main
<luv-main at luv.asn.au> writes:
> On 18.12.15 22:45, Chris Samuel via luv-main wrote:
>> On Thu, 17 Dec 2015 11:06:10 PM Erik Christiansen via luv-main wrote:
>>> I'm not grokking the benefit of doing the rsync _and_ a "cp -al".
>> The idea is to have snapshots over time, rather than a single
>> snapshot. For instance as implemented in: http://rsnapshot.org/
> [...] I didn't realise was that the links appear to be between
> unchanged files across backup versions, to save space.
> It's around 8 years since I used an HP tape carousel for daily + weekly
> backups at work. Not doing that any more, so have devolved to just a
> couple of rotating snapshots, with no need to link between them to save
The active ingredient of rsnapshot is "rsync --link-dest",
if you want to roll your own rsnapshot replacement.
rsnapshot config mandates annoying literal tabs, has a directory
structure that's not directly compatible with samba's Shadow Copy
modules, and doesn't correctly handle a file being deleted, then readded
(i.e. pass --link-dest to ALL snapshots, not just the last one).
Or see btrfs/ZFS snapshots. These operate per block rather than per
inode, so should be more effective and less failure-prone in edge cases
(hint, there's an upper limit on hard link count).
One thing rsnapshot does reasonably well is faking multiple tape
rotations within the snapshot set. e.g. you say "1 yearly, 2 monthlies,
and 7 dailies", and it works out which snapshots to expire.
I don't know how to do that in btrfs/zfs land.
More information about the luv-main