Mondo Rescue - An easy to use disaster recovery software for GNU/Linux

March 20, 2006
Studies show that one of the principal point of hardware failures in a computer pertains to the hard disk. This is especially true if you are in the habit of running the machine for lengthy durations in between reboots to the order of days and months, if not years. Usually mission critical servers are run in such a manner. But now a days, with the advent of always-on internet access, more and more home users find it convenient to keep their machines turned on for days on end even when they are not in use. In such a scenario, it is only a matter of time before the user is faced with a hard disk failure.

This is where the disaster recovery software gain prominence. If you are in the habit of taking a snap shot of your computer file-system on a regular basis, in the advent of a hard disk failure, you can not only save all your data but also get your system up and running in very short time .

There are quite a few ways of getting a snapshot of a live system in Linux. Many of them requiring varying degrees of expertise. One such software is Mondo Rescue which simplifies the whole act of backup and restore of the filesystem in Linux. More specifically, Mondo rescue is a disaster recovery software developed by Hugo Rabson for GNU/Linux which allows one to effortlessly backup and interactively restore filesystems mounted in Linux which includes even NTFS partitions. And what is more interesting is that, you are provided the choice of backing up to a variety of media like the CD-R, CD-RW, DVD, NFS share, tape and even to another partition of the hard disk.

Fig: Mondo in action

To start using this software, you have to first download and install it as it is not bundled by default on Linux distributions. And for Debian based systems, it is as simple as :
# apt-get install mondo mondo-doc
You will need mono-doc package because it contains the detailed documentation in HTML format. Once the software is installed on the system, one can start to create a snapshot by typing the following command as root :
# mondoarchive
This command opens up a curses based GUI which walks you through the process of creating the backup of your Linux system to the desired media. To try it out, I decided to clone my partition containing Linux OS in which I had installed some additional software from the net. I gave it directions to backup everything except /var/log, /proc and /home directories and to my surprise, it neatly created a backup in the form of a series of ISO files ready for burning to the CD. In fact, I could have selected the option of CD/ROM in which case, it would have also automatically burned the image to the CD using cdrecord.

Fig: Backing up files in progress

Backing up is well and good. But what about restoring the data back to the hard disk?
Mondo actually works in conformation with another software or rather a script called Mindi. This script is responsible for creating a bootable CD or floppy image (in cases where you want to restore from the NFS share) which contains the Linux kernel, modules, tools (fdisk, cat, mkfs, gzip, less, more ...) and libraries which helps one to do basic system maintenance in Linux.

Fig: Restoring files in Mondo
So to restore my Linux system to the original state prior to taking the backup, all I had to do was boot the computer using the first backup CD and I would be put into a bash prompt. At the bash prompt, I type the following command:
# interactive
... and the software asks a series of questions which require a yes or no answer and then start the process of restoring the backup. I had the choice of restoring the complete filesystem, a subset of directories or even individual files which made this software very flexible to use.

Also if you have a need of restoring a part of the files from the backup CD while inside the Linux environment, you may use the command :
# mondorestore
... and follow the directions which will also have the desired effect.

Mondo can also be used on the commandline
This utility can also be perfectly used on the command line which will gladden the hearts of people who thrive working from within the shell.

What I found really interesting about the command line method is the combination of options used which made using this utility really intuitive. For instance, if I want to backup the filesystem to a CD, I would use the switch -Oc and for backing up to a tape drive, it is -Ot, to a remote NFS share -On and so on. But these are not the only switches available. I could exclude certain directories from being included in the backup by using the -E switch and include many others by using the -I switch.And if I want a running commentary of what is being done, then I use the verbose -V switch.

For example, instead of using the curses based GUI tool while creating the backup, I could have perfectly passed all the options on the command line as follows :
# mondoarchive -OiV -p mybackup -I / -E "/media/hda1 /var/log /proc"  -d /home/ravi -s 650m 
The above command will create (-Oi) an ISO image containing all the files (-I) in the filesystem except (-E) the files in /media/hda1, /var/log and /proc and save the resulting ISO image in the /home/ravi (-d) folder naming (-p) the ISO mybackup-[1-20].iso . And each of the resulting ISO will have a maximum size (-s) of 650 MB.

I found this utility really efficient and easy to use for my modest backup needs. Another aspect of this utility is that the ISO image created, when burned to a CD can be used as a fully functional CD-based mini-distribution as well as a recovery CD because, as I mentioned earlier, it contains the Linux kernel, the essential libraries, modules and tools.

Pros and Cons of Mondo Archive
After testing and using it for quite some time now, I find Mondo recovery to be a robust disaster recovery software suitable for the needs of both the home user as well as small to medium businesses. Its curses based GUI interface is rather intutive . This software makes backing up Linux and Windows partitions to removable media quite easy.It's support for backup to CD,CD-RW,DVD,tape, hard disk as well as NFS mounts makes taking snapshots of ones harddisk really flexible. Its support for both LVM and RAID as well as boot managers GRUB and LILO brings it at par with its propritery counterparts. One can even create multi-CD backups using this software albeit with an upper limit of 20 CDs per set.

Of course, as with all software, this too has its own shortcomings such as its inability to handle system and hidden attributes when archiving Dos/Windows files. Also some of the features like using regular expression to select a group of files to be backed up is yet to be implemented though there is a button for this made available in the GUI mode.

Having said that, I think these are mere wrinkles when compared to the usability and the sheer number of features of this GPLed piece of software which makes it a powerful tool for taking periodic snapshots of the filesystems.


  • Евгени Спасов

    Nice hit with this article. A was searching exactly for this kind of software piece for using with my new FS v3505 pro :-). Thanks.