Back up your systems with Mondo Rescue

Snapshot

© Lead Image © Christine Lamour, Fotolia.com

© Lead Image © Christine Lamour, Fotolia.com

Article from Issue 177/2015
Author(s):

A timely snapshot by Mondo Rescue puts a computer back on its feet after a system failure in just a few minutes.

Linux distributions provide many applications, but the more programs you use, the more laborious reconstructing a system becomes after a fault. Professional backup programs allow sophisticated backup strategies but often entail a time-consuming and laborious reconstruction of the software after a system crash. With the Mondo Rescue snapshot program, you can back up the whole system on various data storage devices at the touch of a button and restore complete installations without the need for extensive reworking, making a system failure a lot less frightening.

Installation

Mondo Rescue already has been through many years of development and maintenance and is therefore available in the form of binary packages [1] for most popular distributions. To install the distribution-specific packages and their dependencies, first add the corresponding repositories into your software manager.

In openSUSE, open the Software Repositories entry in YaST and click on the Add button. Select FTP as the mode of delivery in the new window then enter a name for the new repository: the associated URL is ftp://ftp.mondorescue.org/opensuse/<Release>/<arch>, where <arch> is either i386 or x86_64. After clicking Next, YaST imports the corresponding data. You will then find the new repository in the list view. Next, install Mondo using the YaST package manager as you would any other program. If the routines complain about a missing mkisofs package, look for the cdrkit-cdrtools-compat package and install this, too.

For distributions that use the Debian package manager, open a terminal window and switch to the /etc/apt/sources.list.d directory. At the prompt, enter

# wget ftp://ftp.mondorescue.org/<Distro>/<Release>/*.sources.list
$ sudo apt-get update

as root, and the package manager adds the repository to the system. If you then call the Synaptic package manager and search for mondo, you will see a list of several packages (Figure 1). Start by installing the mindi packages and then install mondo.

Figure 1: After adding the repository, install Mondo Rescue and Mindi via Synaptic.

During the installation be sure to add the correct versions of the repositories to your system. In our lab, despite completely resolved dependencies, we did not succeed in installing a legacy executable version of Mondo Rescue on the new Debian 8 "Jessie." The Mondo Rescue variant for Ubuntu 14.04 also refused to work on Ubuntu 15.04, throwing memory access errors or faulting outdated program packages.

First Launch

Before using Mondo Rescue, you should free the system of unnecessary ballast that you don't want backed up (e.g., old logfiles and application caches). The BleachBit [2] tool can help you clean up your data quickly and comprehensively, typically saving several hundred megabytes of disk space.

After entering mondoarchive as root in a terminal, Mondo Rescue welcomes you with a fairly rustic looking, but largely self-explanatory Ncurses interface. The program lacks both a menu bar and a configuration dialog.

The first step is to select the target medium to which you will save the system. Unlike many backup solutions, the software supports both special tape drives, various optical media, USB sticks, and hard drives. Mondo Rescue also lets you back up the system to an NFS server on the network if you select Net mount (Figure 2).

Figure 2: Visually outmoded, but efficient: the Mondo Rescue interface.

The backup can take several hours depending on the amount of data being backed up and the target medium selected. Please note that writing to optical media usually takes more time than backing up to a hard disk or to an external flash medium connected to the USB bus. If you intend to back up the system to a USB stick, it is a good idea to check its integrity beforehand using the F3 [3] program. Mondo Rescue does not provide any feedback for faulty or placebo storage – and your backup would be useless.

Caution should also be exercised when selecting the USB Key/Disk menu item: Backing up your data to an external hard drive connected via USB failed on several computer systems running different Linux distributions in our lab. Mondo Rescue understandably aborted the backup run while creating the ISO image and reported memory problems in the corresponding logfiles. However, this error did not occur with the same system configuration when backing up data to a USB stick.

After selecting the appropriate target medium, the software then prompts for compression method; it offers four variants. On the next screen, as well as the different compression levels, it offers you the option of saving the available files in an uncompressed format. This alternative may take up the most space on the target medium, but it also speeds the backup.

Enter the size of the target medium in megabytes on the next screen. With optical disks, the tool requests additional disks once the target value has been reached. If you are using a USB stick, a hard disk, or a network drive with sufficient free memory, first check the size of the data set to be backed up with the df -h command and then specify this target size.

The next screen requests the target medium's device name. The name of the first partition on a USB drive on a single-user computer with built-in internal mass storage is usually /dev/sdb1; optical drives are frequently named /dev/sr0. To request the name of the correct drive, enter the mount command in the terminal window, and choose the desired target drive.

When backing up the system on an internal drive, Mondo Rescue requests the backup path for the images rather than the drive name. The /var/cache/mondo directory is the default. The software creates either one or multiple ISO images, depending on the data set and the specified image size. You can transfer these directly to an optical medium or a flash drive once the backup is complete, thus creating a bootable snapshot.

Enter the path to be backed up in the next dialog. The software supports arbitrary input, which means you can back up data paths such as /home separately. The system's root directory (/) is the default. Various subdirectories in the directory tree do not need to be backed up, and you can exclude these from the backup by entering the path in the dialog that follows. Multiple paths are separated by a pipe character (|). Mondo Rescue generally excludes the subdirectories /tmp and /proc from the backup.

Safe Not Sorry

The software offers to check the integrity of the backup at a subsequent prompt. Although this process can take some time, you should include it for the sake of consistency.

Another safety prompt appears that you need to respond to positively if you are using a recent Linux distribution. The software does not allow subsequent modifications to the configuration. If you do want to change any settings before performing the backup, you need to cancel the dialog and run it again from scratch. When the backup starts, the program first generates a file catalog and then activates the program integrated in Mondo Rescue called Mindi, which creates a bootable ISO image.

Mondo Rescue backs up the existing data sets of the source medium in two runs: The software transfers the smaller files in the first run and the larger files in the second run. During the backup, the program offers two progress displays, depending on the target medium. When backing up to optical media, in addition to the traditional percentage bar display, a second horizontally arranged bar shows space use relative to the medium size. With very heavy compression, the CD or DVD can feel relatively slow compared with the original data set (Figure 3).

Figure 3: While backing up, the software keeps you apprised of the progress.

If you are using optical disks as the target media for the backup, Mondo Rescue starts the mkisofs program after creating ISO images and burns the images to the disk (Figure 4). If you are using the hard disk as a backup target, the verification run starts immediately after the backup has been completed.

Figure 4: The program ensures data integrity with a verification run.

If errors occur, the software displays them and you are forced to repeat the backup. When saving your data on optical media, the tool checks the medium after the burning process has finished. Mondo Rescue then returns to the shell prompt.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Mondo and Mindi

    Mondo shows that backups don’t need to be time consuming or difficult. This amazingly simple tool backs up complete hard disks or individual directories.

  • Cloning Hard Disks

    Is your hard disk making strange noises? Do you intend to make some major hardware changes? Maybe it’s high time to clone your disk. Four tools help Linux users and system administrators move their data and create one-to-one copies.

  • SystemRescueCd

    If you accidentally delete data or format a disk, good advice can be expensive. Or maybe not: You can undo many data losses with SystemRescueCd.

  • Trinity Rescue Kit

    Trinity Rescue Kit is driven by the practical requirements of the admin’s daily work, integrating a full set of tools for maintaining and rescuing Linux and Windows PCs.

  • Admin Workshop: Backups

    Data always seems to get lost at exactly the wrong moment, but the right backup strategy can help you restore those missing files.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News