Linux System Backup using Mondorescue onto 650 Meg CD-ROMsNote: 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 speedIf 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
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:
For CCP14 Linux Laptop - CDR write oncemondoarchive -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 backupType (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 backupJust 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. |