Verify your backups… or lose them all

Follow me on Identi.ca  or Twitter  or Diaspora*diaspora-banner

As a good sysadmin, you thought you had backups for your server but you didn’t verify them before the major migration you attempted? When you need them, they’re empty or full of useless files. And now it’s too late…

nobackup

Wen you discover that you don’t have usable backups – lesjoiesdusysadmin.fr

You won’t guess how often this situation occurs.

Backup Checker is a command line software developed in Python 3.4 on GitHub (stars appreciated 🙂 ) allowing users to verify the integrity of archives (tar, gz, bz2, lzma, zip, tree of files) and the state of the files inside an archive in order to find corruptions or intentional of accidental changes of states or removal of files inside an archive.

github-logo

Install Backup Checker from PyPI

The easiest way to install Backup Checker is from PyPi using the following command:

$ pip3.4 install backupchecker
Debian Wheezy and Squeeze packages for Backup Checker

Backup Checker Debian packages are now available for your stable servers Wheezy and Squeeze in the MyTux Debian repositories.

Debian Squeeze

Just copy/paste the following command on your server to add the MyTux Debian Squeeze repository and install Backup Checker:

apt-key adv --keyserver pgp.mit.edu --recv-keys 2B24481A 
&& echo "deb http://debian.mytux.fr squeeze main" > /etc/apt/sources.list.d/mytux.list 
&& apt-get update 
&& apt-get install backupchecker
debian-squeeze-toy
Debian Wheezy

Just copy/paste the following command on your server to add the MyTux Debian Wheezy repository and install Backup Checker:

apt-key adv --keyserver pgp.mit.edu --recv-keys 2B24481A 
 && echo "deb http://debian.mytux.fr wheezy main" > /etc/apt/sources.list.d/mytux.list 
 && apt-get update 
 && apt-get install backupchecker

wheezy

Using Backup Checker

2 steps are needed to secure your backups. First you need to generate the configuration files of your backups, using the following command:

$ backupchecker -G /backups/backup-08032015.tar.gz

This generates 2 files /backups/backup-08032015.conf and /backups/backup-08032015.list you need to store in order to verify this archive later (the -O option lets you define a custom location to store the files).

Second step is to verify your backup. It is as simple as:

$ backupchecker -c /etc/backupchecker/backup-08032015.conf -l /var/log/backupchecker.log

Then check if warnings have been sent to /var/log/backupchecker.log. Really simple isn’t it? Scripting this command, your backups are now verified and secured. If any modification occurs, it will be detected and pinpointed.

What do you thing about it?

As usual, any feedback is welcome, through bug reports, emails of the author or comments on this blog.

Several companies now use Backup Checker to secure their backups. Let us know if we can help you.

 

2 thoughts on “Verify your backups… or lose them all

  1. Pas d’installation sous Jessie pour le moment ?
    Je dis cela pour taquiner 🙂
    “brebis” fully automated backup checker, sous jessie.
    A pluche.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *