Advertisment

Free Backup for Linux Installation

author-image
PANKAJ
New Update

A free alternative to backup and restore in a Linux or even Linux/Windows system, Mondo has been around since 1999.

Advertisment

Mondo can backup an OS installation to tape, CD-R, CD-RW, NFS or a hard-disk partition. It supports LVM, RAID and many systems including ext2/3, Reiserfs, VFAT and even NTFS. The latest release of the software, along with dependencies and the PDF manual are on this month’s PCQEssential CD in the Linux section. 

What you need



Mondo works on Intel and Intel-compatible processors, and requires at least 64MB RAM (128 recommended) and 800 MB free HDD space. The Linux kernel version you need is 2.2.19, 2.4.7 or a later version (with stable loopfs support). Other hardware you need is a CD-Writer and blank CD-RW/CD-Rs on which to burn your installation’s image. 

Writing the image on a CD is the best and easiest option. You can also save the image on a hard-disk, tape and even on NFS. Lastly, you need root access to your Linux installation. 

Advertisment

We tried the software on a full install of PCQLinux 8.0. A few dependencies are not found in this distro, which you will find on the CD. These include afio, lzo, lzop, newt and slang. Afio is a tar ball, which has to be installed by untarring and then running it as follows from the afio-2.4.7 directory. 

# tar -zxvf afio-2.4.7.tgz 



# ./configure; make; make install

Others are rpms which can be installed running: rpm -i

Advertisment

Getting started 



Once you’ve installed the dependencies, install Mindi and then Mondo. Mindi Linux is what creates the boot/root disk images, which can be burned on a CD or even written on a floppy. 

mondorescue.org provides the latest releases and has links to their mailing lists and forum

It’s a boot-disk creation toolkit. Mondo is the backup engine. Despite finding all dependencies, Mondo may refuse to install claiming it can’t find afio (which you know for sure you’ve already installed), as it did in our setup. Then just force install it as follows: 

Advertisment

# rpm -ivh mondo-1.66-1rht80.i386.rpm —nodeps

Now test if Mindi’s working on your setup by running it simply by typing Mindi in a terminal Window. When you’re asked whether you want to use your own kernel, say yes.

If you say no, Mindi will include its own kernel, which is there for distributions where the native kernel won’t do. That’s about it. Mindi will then do its work and echo everything on the terminal for you to see. You will finally be asked if you want to create boot+data floppy disks. Answer yes if you want to use floppies, no if you’re using CDs. We chose not to bother with floppy disks. Now you have a Mindi ISO image which can be burned on a CD-R/CD-RW. To do that, first check where your CD-writer is located:

Advertisment

# cdrecord -scanbus

It was 0,0,0 in our setup. Most likely it will be the same for you. If not, then just note down the location because you will need it for the following command, which writes your test CD. First change to the directory where the ISO file is stored:

# cd /root/images/mindi

Advertisment

Then, to write to a CD-RW medium:

# cdrecord -blank fast dev=0,0,0 speed=2 mindi.iso 

or for a CD-R:

Advertisment

# cdrecord dev=0,0,0 speed=2 mindi.iso 

Ideally use a CD-RW for this purpose, so you can re-use that disc. Once you get your CD freshly burned with the Mindi image, use it to boot into your system. That should drop you into a console with basic tools. Type Help to see what all you can do here. If you can get an output, your test CD works. 

Backing up



Now you can relax and create a backup of your system’s installation using mondoarchive. It supports a dual-boot system using lilo booting Linux and Windows. There are many options you can try out while backing up. You should go through the manual page of Mondo by typing:

# man mondoarchive

While running, this program uses a temporary directory for the backup and a scratch directory for the image. 

You can change the location of these two by using the -T and -S switches. 

In our setup, we used a large ext3 partition for scratch space, called mondo_disk. To omit a directory from getting backed up use the -E switch. Here’s the command:

# mondoarchive -Oc 2 -d 0,0,0 -9 -S /mnt/mondo_disk -E

/tmp/





Here, the -Oc specifies that you want to write to a CD-R. Change the ‘c’ to ‘w’, if you want to write to a CD-RW. The ‘2’ specifies the speed at which you want to write the CD, ‘-d’ points to the device and the rest are explained in the above para. 


You can view the log of the operation from /var/log/mondoarchive. log by:

# tail -f /var/log/mondoarchive.log

If more than one disc is needed, you will be prompted for it. Ideally, use CD-R medium for this operation because otherwise you’ll be locking up your CD-RWs that can otherwise be reused. 

And now: Restoring 



You can restore in more than one modes: 

Nuke. This is a fully automatic mode and requires you to supply the CDs when there are more than one. 

Interactive. Here you get to have a say in each step of restore — like the way the hard-disk is partitioned, to the filesystem on it

nd more. 

Expert. Here you get to do everything. From partioning the hard-disks to formatting to restoring. 

In our setup, a 4-disc (40GB hard-disk) PCQLInux 8.0 install was cloned flawlessly on another same-sized, hard-disk using nuke. 

What if it doesn’t work



There is an online forum (http://forum.mondorescue.org/) and a mailing list

(http://lists.source



forge.net/lists/listinfo/mondo-devel) where you get help from users and contributors of Mondo. Notably Hugo Rabson, who started the project. 

You can also contribute to the project on sourceforge.net. (http://sourceforge.net/projects/

mondo/).

Shruti Pareek

Advertisment