Towards Zen and Art of Backup and Recovery in Linux

08 Sep 2012

If you are not backing it up, you are not doing it right. Having a good backup solution not only for the documents but for the entire system, is nothing less than liberating. It puts an end to the nightmare of files lost due to overwriting, corruption, crashes and deletion etc. I looked up for applications in this league, for those which offer most of the features among my own set of criteria and came up with a list of the potential candidates.

Two Kinds of Backup I Need

  • I should be able to backup important files(documents) and folders.
  • I should be able to take snapshots/images of my entire Ubuntu system and should be able to restore one of the them.

I Was Hacking Around Both

  • Backing up files and folders: While being fully aware that not having a proper backup system and relying just on the syncing ability of Google Drive and Dropbox will bite me once, I still stayed on and wanted to take a look at other options only when I actually ran into the very first issue.
  • Backing up the entire system: I would tar the root folder(excluding some sub-folders), compress it and use it to replace the running system, taking care of booting in case of problems. Making a raw image of your partitions using dd to dump the entire partition to a single file works too (with a fatal problem lurking just in case you end up switching the input and output interfaces) but restoring step is painful (tweaking fstab, grub re-installation etc).

Now, these quasi-backup-systems are manual, errorprone and leave decent room for catastrophic issues. So, I wanted to put proper ones in place.

Let’s look at both categories one by one:

#1 - File(Document)/Folder Backup

Mostly Required and Some Nice to Have Features

In a good file backup solution, here are the features I am looking for:

  • Reliability for no data loss, backup corruption check with MD5 or other checksum algorithm
  • Ease of restoring from a native storage format
  • Automatic backups and easy scheduling
  • Incremental backups
  • Encrypted backups
  • Command line as well graphical interface
  • Ability to store specific versions of an individual file
  • Remote backup via SSH/FTP etc.
  • Good revision history (yeah.. more than just sync)
  • Should not modify data or meta-data
  • Should preserve deleted files
  • Ability to backup the entire home network
  • External storage support
  • User level backups
  • Multiple backup locations
  • Low CPU/memory usage
  • Good inclusion/exclusion filters
  • Should optimize space usage by recognizing duplicate content (e.g. renamed/copied but hardlinked) across backups/across machines and other means

Potential Candidates

  • Deja dup
  • Duplicity
  • Back in Time
  • Rsnapshot
  • Rsync / GRsync
  • Simple Backup
  • CrashPlan
  • File Backup Manager
  • Rdiff-backup
  • TimeVault
  • storeBackup

That’s about it and now on to system backup.

#2 - System Backup

Mostly Required and Some Nice to Have Features

Most of the features listed in file backup section are needed in a system backup solution as well. Some of the above features (those with a bit of twist in this case) and some new ones specific to system backups, that I am looking for, are:

  • Statistically no chance of any data corruption
  • MBR backup
  • Good GUI (don’t want to run the risk of messing up when things are already in bad shape)
  • Superfast backup/clone/image (especially important in contrast to file backup which can happen in background) and restore
  • Automated with scheduling rules (rules like take backup before/after a package install/uninstall)
  • Backup on go with support for filesets (ability to take backup while the system is running maintaining consistency among the files in a particular fileset)

Potential Candidates

  • Partimage
  • Partclone
  • Fsarchiver
  • GhostForLinux
  • Clonezilla
  • Backuppc
  • rsync

So, I have lots of features to look out for and pretty good number of options in both categories.


I have trimmed down the options available to myself in each of the categories based on the corresponding criteria mentioned above and started evaluating the three most promising ones in both categories. I am planning to use one of Google Drive / Amazon S3 / Dropbox for online backup as well (a connected backup is not the full-proof solution after all courtesy the possibility of a theft / natural disaster etc.).

Have I missed any other nice tool in this space? What does your own backup system look like? Other related ideas are welcome too.

blog comments powered by Disqus