Brebis 0.7, the fully automated backup checker

brebis, debian, sysadmin

Follow me on Identi.ca  or Twitter 

The new version of Brebis « Chevillette » 0.7 was published two days ago. Brebis is a fully automated backup checkerBrebis does not create backups. It only performs controls on them.

Brebis is able to detect a corrupted archive compressed with different formats, automatically checking the integrity of your archives and lots of parameters of the files inside these archives or inside a tree of files and provide detailed reports if unexpected states are detected. Check out the list of the supported features.

What’s new?

The main features of this new version are:

  • new option -G or –gen-full to generate from you archive (or from  your tree of files)  the configuration file and the list of files you need to run Brebis.
  • new parameter target to check the target of a link

Complete example of installing, configuring and running Brebis

How to install from your package manager

Brebis is available in DebianFreeBSDArchlinux and Frugalware. Use your favorite package manager to install it.

How to install from the sources

# wget http://brebisproject.org/attachments/download/8/brebis-0.7.tar.gz
# tar zxvf brebis-0.7.tar.gz && cd brebis-0.7
# python3.3 setup.py install --install-scripts=/usr/bin
# mkdir /etc/brebis

What you need before running brebis

Our goal is to check on a regular basis the archive /backups/monthly-backup.tar.gz.

Brebis needs two files in order to correctly run: a configuration file with general parameters and the list of files with all their parameters.

Don’t be afraid, both of theses files will be generated by Brebis with the following command:

# brebis -G /backups/monthly-backup.tar.gz
# ls /backups/
monthly-backup.tar.gz monthly-backup.conf monthly-backup.list

All the files inside your archives have been detected and their names and parameters (uid, gid, mode, md5,…) have been written in the file monthly-backup.list. More information about those files.

How to configure Brebis

Lets save /backups/monthly-backup.list in /etc/brebis:

# mv /backups/monthly-backup.list /etc/brebis

For  /backups/monthly-backup.conf, we just modify the files_list parameters:

[main]
name=monthly-backup
type=archive
path=/backups/monthly-backup.tar.gz
files_list=/etc/brebis/monthly-backup.list

We also save monthly-backup.conf in /etc/brebis:

# mv /backups/monthly-backup.conf /etc/brebis

Use Brebis

Using Brebis is as simple as:

# brebis -c /etc/brebis/ -l /var/log/brebis.log

If there is not any difference between the current state of your backup and your list of file, the logfile /var/log/brebis.log will be empty. If any difference happens, they will be reported in /var/log/brebis.log.

Show time. I’m modifying the md5 hash sum of a file in  /etc/brebis/monthly-backup.list, during the next run of brebis, I get the following content in brebis.log:

WARNING:root:1 file with unexpected hash while checking
/backups/monthly-backup.tar.gz:
WARNING:root:toto/titi hash is ce4f8cacd8fc702bdd03531b9447818b.
Should have been ce4f8cacd8fc702bdd03531b94478184.

As you can read, Brebis reports a difference between what was expected and what it checks.

Now it’s easy to do the same for any backup you want to check on a regular basis. Just add something like the next line in /etc/crontab:

01 00 * * * root brebis -c /etc/brebis/ -l /var/log/brebis.log

A brebis run will happen every day at midnight to check your backup. Every configuration files in the directory /etc/brebis/ will be inspected.

Feedback about Brebis

We at the Brebis Project welcome any feedback about Brebis. Feel free to subscribe to the Brebis-users mailing list, by Twitter or email me directly at carl.chenet@brebisproject.org

Official website: http://www.brebisproject.org
Mailing-list: http://lists.sourceforge.net/lists/listinfo/brebis-users
About these ads

2 réflexions sur “Brebis 0.7, the fully automated backup checker

  1. « Brebis does not create backups », alors oui je comprends mieux, Brebis ne fait pas les sauvegardes, il ne fait que « vérifier » la bonne santé de la sauvegarde, mais l’autre jour j’avais posé la question: est-ce que brebis peut vérifier la bonne santé d’une sauvegarde qui aurait été faite avec une application comme déja dup ?
    A pluche.

  2. anatolem : déja dup est un frontend à duplicity. Je ne sais pas pour deja dup mais duplicity propose le paramètre verify qui offre quelques fonctionnalités de vérification de l’état des sauvegardes. Pour aller plus loin(+ de paramètres de vérification,+ de types d’archives supportés), tu peux bien sûr utiliser Brebis sur les archives générées par duplicity.

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s