[Nottingham] Backups: How do you do yours?
Martin
martin at ml1.co.uk
Wed Mar 16 14:50:49 UTC 2011
On 16 March 2011 12:52, Chris Burton <Chris at 7of9b.org> wrote:
>> What I wanted to do was created a rotating backup system, backing up
>> daily,
>> writing the latest daily backup to a weekly folder once a week. Finally,
>> once a month, write a backup to a tar.bz2 file to be written to tape.
>
> For rotating daily backups I use a "cp -la" to get a copy (links) of the
> data and then rsync into that dir - it does mean you've only got one copy of
> any data that hasn't changed but for my use that's fine.
Take care with using hard linking... That doesn't actually give you a
safe backup.
The hard links mean that you can change the contents of the source
file and then that change is immediately seen for all the other file
names that link to that inode. If you're wanting to take what is
commonly understood to be a backup (ie, an unchanging snapshot of the
filesystem), then best is to copy the data to new inodes, preferably
onto entirely different hardware.
rsync has a feature to hard link against a previous version if you're
keeping dated snapshots. "Back in time" uses that.
The cp -la will give you a 'snapshot' of the filenames. I guess that
is a clever intermediate step if you've not got lvm or btrfs to hold a
true snapshot for you.
Always keep your backups physically remote from the source machine in
case of physical disasters such as cleaning staff, fire, theft,
earthquake, or tsunami!
Cheers,
Martin
More information about the Nottingham
mailing list