[aklug] Re: Automating backup tests

From: Joshua J. Kugler <joshua@eeinternet.com>
Date: Mon Aug 02 2010 - 09:22:55 AKDT

On Sunday 01 August 2010, Christopher Howard elucidated thus:
> Just wondering if anybody else had thought along these lines before:
> We all know it's not enough to simply run backups of important data:
> we are also supposed to periodically pull the backup archives and
> restore them to see if the backups themselves are good. But instead
> of doing all that manually, what about writing backup testing scripts
> also?
>
> The reason I was thinking about it is because I am a recent convert
> to the practice of writing unit tests for my program code. So I was
> thinking maybe we should have 'unit tests' for our file backups also.
> Say, you write a bunch of scripts that pull some of the backup data
> from your remote stores and MD5s them against the real data; then you
> batch run these scripts once a month (or whenever) and see if you get
> any bad output.

With most backup systems, a restore will be all the test you need, and
that is often very easy to script. A system such as Bacula will store
the hash checksum of a file in the database (md5? sha1? I forget), and
will compare it when it restores it.

There is also a "verify" job that will do nothing except compare the
checksums to the stored files. Again, very easy to script execution.
In fact, in Bacula, you can schedule it as a job and just make it
a "Verify" level job. You'll be notified automatically of any checksum
mismatches.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Aug 2 09:23:09 2010

This archive was generated by hypermail 2.1.8 : Mon Aug 02 2010 - 09:23:09 AKDT