[H-GEN] Linux backup tool of choice

Michael Anthon michael at anthon.net
Sat Apr 12 20:46:22 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

----- Original Message -----
From: "Russell Stuart" <russell at stuart.wattle.id.au>

> me).  Typically you don't notice until the next day, but by then it is
> too late - your mirror drive has the same data on it as your master.  In
> my experience this type of failures is far more common that a hardware
> failure.

True, but I believe the point was that you make a snapshot, then compress it
(if you feel it's needed), *then* make a long term backup of the result
elsewhere by whatever means.  Obviously there is then the option of keeping
the last N days worth of backups on that disk until you run out of space.
It's very easy to do this with a few commands strung together like this...

ls -t1 $backup_dst_dir | tail +3 | xargs -n1 -i rm -rf $backup_dst_dir/{}

This should remove every from $backup_dst_dir except the most recent 3
files.  Add that to the start of your backup script and you get a rolling
backup for the last 3 days.

Cheers
Michael


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list