Article submitted by Андрей Парамонов (Andrey Paramonov). DebADay needs you more than ever! Please submit good articles about software you like!
Everyone knows they should do regular backups. Sooner or later, your hardware will fail, or you will accidentally delete a directory, or something else will happen.
Many people, however, ignore periodic backups because they find it too much of a hassle. That’s why, the backup procedure must be fully automated and require no user intervention, at all.
Backupninja is a backup system that provides excellent automation and configuration facilities. You only need to instruct Backupninja once, and he will take silent duty of defending your valuable data. This can be done via direct edit of configuration files, or via a nice console wizard called
ninjahelper, which also helps to test the backup actions interactively.
Backupninja doesn’t do the hard work himself, but rather relies on specialized tools like rdiff and duplicity, thus following the Unix-way. There is built-in support for specialised backup actions, including things like the backup of Subversion repositories, or LDAP, MySQL, and PostgreSQL databases. It can do remote, incremental backups, as well as burning them to CDs or ISO images.
But the best part is that Backupninja is capable of learning new powerful skills, just by reading user-provided shell scripts. For example, I use the following script to dump important package information of my Debian system:
#!/bin/sh dpkg --get-selections > /var/backups/dpkg-selections if [ $? -ne 0 ] then error “dpkg selections dump failed” else info “dpkg selections dump done” fi aptitude search -F %p ‘~i’ > /var/backups/apt-installed && \ aptitude search -F %p ‘~i!~M’ > /var/backups/apt-installed-manual && \ aptitude search -F %p ‘~i ~M’ > /var/backups/apt-installed-auto if [ $? -ne 0 ] then error “installed package list dump failed” else info “installed package list dump done” fi
Note the use of some special functions:
error. They put descriptive messages into the log file. It allows me to quickly ensure that fresh backups have actually been created. I’ve been using Backupninja to backup my personal data for a long time.
- Fully automates the backup procedure
- Is very easy to setup
- Is very flexible
- Build-in functionality could support more features
- Support for non-shell backup scripts is limited