[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

Collaborative Computational Project Number 14

for Single Crystal and Powder Diffraction

CCP14

Backing up onto CD-ROM using the GPL'd Mondorescue for Linux

Using the GPL'd Mondorescue for Linux to create easy Linux system disaster recovery backups on bootable SCSI or Atapi/IDE CD-ROMs

The CCP14 Homepage is at http://www.ccp14.ac.uk

[Back to CCP14 Web/Config Main Page]

[CCP14 Mondorescue homepage | [Why use Mondorescue | Where to get Mondorescue | Compiling and installing Mondorescue]
[CD-ROM backups] | [DVD and DVD-RAM backups] | [Misc Mondorescue information] |

Linux System Backup using Mondorescue onto 650 Meg CD-ROMs

Note: This is using Mondorescue 1.4x.

(caveates: for interactive partial restoring from backup CD-ROM disks created with mondorescue 1.4x, the dvdram device should be aliased to /dev/cdrom: e.g, ln -sf /dev/hdc /dev/cdrom)

In the following example, we are going to just backup the Linux system area (including /usr/local) onto 2 CDs. The CDs will be bootable and can be easily verified using the Mondorescue system (using the veryfy "-V" option).

In the CCP14 case, a minor mistakelet was made in not buying a writable CD with the new Linux server (because a read/write DVDRAM drive was purchased). This complicates things minorly but not too much. Instead of writing directly to the CD, we instead write ISO images which are then written to CDR on an MS-Windows machine.

If you have a writable IDE/Atapi CD, you will need to make it emulate a SCSI device before you will be able to write to it with linux and cdrecord. E.g., using the following type of "append" command in the /etc/lilo.conf. Then typing lilo -v then rebooting for it to take effect.

image=/boot/vmlinuz-2.4.18-17.7.x
        label=linux
        initrd=/boot/initrd-2.4.18-17.7.x.img
        read-only
        append="hdc=ide-scsi"
        root=/dev/hda2

As the /tmp area on the CCP14 server's IDE main disk is very large, we use this as a temporary area for the file and the ISO images.

To do the backup to standard 650 Meg ISO images with very fast LZOP compression, type:

mondoarchive -g -S /tmp -T /tmp -L -E "/web_disc /web_logs" -Oi -d /tmp/isos

Warning : cryptic cdrecord errors in the middle or near the end of writing CDs on the following could imply/infer underwrite buffer problems. Try using a slower speed

If you had a 8 speed CD-writer with 700 Meg disks, you write the images directly using something like (getting the SCSI address using cdrecord -scanbus ):

mondoarchive -g -s 700m -S /tmp -T /tmp -L -E "/web_disc /web_logs" -Oc 8 -d 0,0,0

Or with an 8 speed CD-RW disk, you write the images directly using something like (getting the SCSI address using cdrecord -scanbus ):

mondoarchive -g -S /tmp -T /tmp -L -E "/web_disc /web_logs" -Ow 8 -d 0,0,0

  • -g gives Mondo a nice happy curses based interface telling you what is happening.
  • -S and -T tell Mondoarchive to put any temp images and iso images being formed in /tmp (by default it is in the partition where the program has been called).
  • -L tells Mondoarchive to use lzo/lzop compression. This compression is not very good but is very fast and can save a lot of time in creating the archive and restoring it compared to bzip2 and gzip. If the archive is going to go over 1 CD with bzip2 or gzip - you may as well use this.
  • -E - in this case -E "/web_disc /web_logs" tells Mondoarchive to not backup the data areas (partitions) we have specified.
  • -Oi says create ISO files.
  • -d /tmp/isos in this case says put the iso files (default of 650 Meg size) to the /tmp/isos directory.
  • If you had larger 700 Meg CDs you could use the -s 700m parameter.

When Mondoarchive finishes, don't bother to create the floppy disks (unless you don't have a bootable CD-drive on the server), though there is also a bootable CD mini-image in the /root/images/mindi directory. As the data archive CDs are bootable, it is not necessary to burn the mini-image.

Either using Samba or whatever makes you happy; get the ISO images to a PC with a CD writer and burn them on.

On local systems and networking, Samba can support at x4 quite nicely directly onto the CD using Windows Easy CD-creator software - though make sure you validate the CD images after they have been burnt using mondorescue - mondoarchive -Vc 16 (on a 16 speed CDReader). x8 on these systems and network risked occassional underwriting problems.

Also to mount and view an ISO image file on Linux:

  • mkdir -p /mnt/isoimage
  • mount -t iso9660 -o loop 1.iso /mnt/isoimage


For CCP14 Linux Laptop - CDR write once

mondoarchive -g -l LILO -f /dev/hda2 -s 620m -L -Oc 4 -d 0,0,0

(or for CD-RW : mondoarchive -g -l LILO -f /dev/hda2 -s 620m -L -Ow 4 -d 0,0,0)

-Oc 4 (try going slower than the max speed of 8x as underwriting seems to be happening as per some cryptic cdrecord errors at 8x)

-s 620m (try this - default size failed on writing to the CD (possibly due to cdrecord not being able to work out the track size) {grrr} - "it's UNIX baby") Looks like the problem may have been an underwrite problem from using too fast a speed.

-m - for manual loading and unloading of the CD into and out of the laptop.

-l and -f required as this is a dual boot system and the boot loader is in /dev/hda2

OR it mondoarchive fails to write directly to the CDR (and there is spare space on the hard-disk):

mondoarchive -g -l LILO -f /dev/hda2 -L -Oi -d /root

cdrecord dev=0,0,0 speed=8 /root/1.iso

cdrecord dev=0,0,0 speed=8 /root/2.iso

Writing an ISO image with CD-RW discs:

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

Blanking an ISO image with CD-RW discs:

cdrecord -blank fast dev=0,0,0


Verifying the CD backup

Type (in this system case on /dev/scd0 - a 16 speed CD):

mondoarchive -Vc 16

When prompted, enter the device path of (in this case) /dev/scd0 (a kludge of this drive not being a CDR or CDRW, but a normal Read only CD reader - Grrrrr). Mondorescue should then validate that the ISO images on the CD are kosher and readable.


Restoring the CD backup

Just put the 1st CD in the drive and reboot.

Unless you want to do a "nuke" reinstall, type interactive and follow the instructions. If you don't want to wipe the data disks (a good idea), type:

interactive

When the Editing Mountlist menu comes up, delete the unbacked up partitions from the table so that they will not be reformatted (in this case, the two data partitions /web_disc and /web_logs )

Then do OK to continue.

Save the table, then when prompted, (unless you want to resize the paritions) DO NOT erase and partition the hard drives.

When prompted, format the hard drives (it will prompt before formatting each partition)

When prompted to restore all the data, say Yes. Mondoarchive will then restore all the data. (this is the happy bit)

On the "Initialize the boot loader?" prompt, select Yes

When asked, Yes we did change the mount list.

When prompted, edit and check the fstab partition table and lilo.conf (this will happen in the vi editor). Then continue on.

When prompted, select Yes to label the ext2 and ext3 partitions.

Wait until Mondorescue goes back to # prompt. Now make sure the CD-ROM is ejected and reboot the machine to bring back the restored operating system.

If you have any important subdirectories under the /tmp area - you will have to create them again as by default, Mondorescue does not backup the /tmp area.


[CCP14 Mondorescue homepage | [Why use Mondorescue | Where to get Mondorescue | Compiling and installing Mondorescue]
[CD-ROM backups] | [DVD and DVD-RAM backups] | [Misc Mondorescue information] |

[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

If you have any queries or comments, please feel free to contact the CCP14