26. August 2012

Rotating Backups with rsnapshot

Looking for a light-weight, space-efficient backup solution for your data on local machines and remote servers? Give rsnapshot a try: relying on existing toolchains, opting for convention over configuration, and simple customization for slightly trickier backup tasks.

Harddisk failure is a sure event. It is not bad luck but just a matter of time. Hence backing up relevant data is the best preparation. I tested rsnapshot in order to backup personal data on my local machine, data on servers, and databases on remote machines. Here, I list the features of rsnapshot that make it particularly suited for the task at hand.

Rsnapshot prefers convention over configuration, and the configuration file that ships with rsnapshot needs only minimal changes in order to make it backup your personal data.

Rsnapshot creates rotating backups and makes use of hardlinks to keep the storage requirements for the backup down to a minimum. This way one can restore data from multiple snapshots in the past.

Some safety features are also built-in. For example, rsnapshot makes it hard to accidentally overwrite backups by allowing only the root user write to the backup directory. Also, you can control the order in which old backups are rotated.

Rsnapshot is available for GNU/Linux systems.