Produce an image of your trixbox hard drive with Mondo
Mondo is a reliable, comprehensive and free utility to allow you to backup and restore your hard drives. Mondo runs on GNU/Linux and is easy to install on Centos and trixbox. With Mondo it is easy to back up your trixbox PBX to CD-R and in the event of catastrophic data loss, you will be able to restore all of your data [or as much as you want], from bare metal if necessary. This means that you can use the CD’s, which are bootable, to produce a clone of your trixbox system.
This how-to describes the generation of iso images on a trixbox system that can then be copied to another PC equipped with a CD burner. There are lots more options, not covered here, that are described on the Mondo website and in the links given below.
Dec 2007 UPDATE
The process described below has been tested and works with trixbox 2.0.0 running under Centos 4.4. Current stable releases for trixbox run under Centos 4.5 and the process described below with the mondo file versions described fails….. This is being investigated…….
Follow each step
- You need gzip and mkisofs and cdrecord.
gzip and mkisofs should already be installed with trixbox. If not use yum to install them.
install cdrecord " yum install cdrecord " then accept the y answer.
- Download the files. Those required for Mondo are listed on the download page but you should require:
afio buffer mindi-busybox mindi mondo
- The current version of trixbox runs on Centos 4.4. You can get rpm packages that will work with Centos 4.4 on the Mondo ftp site. Download the files from the RHEL4 link. Obviously if the Centos version on trixbox is updated the RHEL version may need to be updated as well. Get the latest versions currently (June 2007) these are:
afio-2.4.7-1 buffer-1.19-1 mindi-1.2.4-1.rhel4 mindi-busybox-1.2.2-3.rhel4 mondo-doc-2.2.4-1.rhel4 mondo-2.2.4-1.rhel4
- download them to a directory on your TB system
e.g. use the path /usr/local/src. so " cd /usr/local/src " then use " wget " to download the latest version of each package
wget ftp://ftp.mondorescue.org/rhel/4/package.rpm
where package.rpm is (currently): afio-2.4.7-1.i586.rpm buffer-1.19-1.i386.rpm mindi-busybox-1.2.2-3.rhel4.i586.rpm mindi-1.0.9-2.rhel4.i586.rpm mondo-2.2.4-1.rhel4.i586.rpm mondo-doc-2.2.4-1.rhel4.noarch.rpm
- If you do not use “wget” and decide to downloaded the packages to your PC with your browser you need to copy them to your trixbox system with winSCP
Installing the rpm packages
- Install them using rpm.
cd to where you downloaded the files, e.g. /usr/local/src
- OPTION 1 - if the directory ONLY contains the rpm’s just downloaded.
in the console execute the command " rpm -ivh * " (less quotes and note the wildcard) all the rpm's should install in the correct order.
- OPTION 2 - install each separately if the directory contains other rpm’s that you do not want to install
eg install afio " rpm -ivh afio-2.4.7-1.i586.rpm " repeat for each of the rpm's buffer, mindi-busybox, mindi and mondo. Mondo depends on Mindi, so install last.
- All the packages should install correctly. You should not get any dependency errors. If using option 2 make sure you installed in the correct order. You can then delete the downloaded packages as they are not needed.
Remove a package
- If you install an rpm package by mistake you can erase them with rpm -e packagename
Test the installation
- Run the command “ mindi “
- You will be asked a number of questions, just accept the defaults by using ‘enter’.
- No images are generated but this test creates a cache needed when you run mondoarchive.
Use Mondoarchive to make an image of your hard disk
- Run the command “ mondoarchive “ and Mondo will run in interactive mode.
- At each screen select the options as follows:
- Hard disk (this copies the iso images to your hard disk)
- The location where your iso’s will be stored or just accept the default
- The compression such as ‘average’
- Specify the maximum size of your image (eg 680M) for each CD.
- Add the prefix name to your image files
- Enter the paths you want to backup. Accept the default “ / “ this will back everything. You will then be able to clone your system by booting your rescue cd’s in another system.
- Enter any paths you want to exclude. For a full backup (which you probably want) hit enter.
- Do you want mondo to verify the images? [Yes]
- Is the kernel sane and sensible? [Yes]
- Do you want to proceed? [Yes]
- Mondoarchive will make, probably 2 ISO images of your trixbox system and store them in /root/images/mondo (or where you specified)
- At the end a couple of key presses with ‘enter’ will complete the process.
Make the recovery CD’s
- Copy the iso images to your PC, using winSCP, and burn the CD’s.
- Label them as rescue disk, #1 and #2 etc.
- If you boot a machine with rescue disk #1 and select the ‘nuke’ (lowercase) option it will reformat your disk (permanently wipe out any pre-existing files). You will also need disk #2 etc to complete the new installation.
- Old hardware configurations that existed on your original server may / will be removed (by kudzu) and newly discovered hardware components on your fresh server will be installed automatically, if you answer ‘yes’ to the various questions posed by ‘kudzu’ as the new server boots.
- A copy of the files (Centos and trixbox etc) that were on the system that ran mondoarchive will then be installed and you will end up with a clone of your original trixbox system.
Please send us comments and feedback of your successes or failures so that we can keep this how-to up to date.