Open main menu

Backups

Revision as of 16:39, 1 November 2008 by Freephile (talk | contribs) (how to do backups with Mondo Rescue)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

There are two things that I'm doing with backups:

  1. I'm archiving an old machine before I wipe it completely to turn it into a Media Center PC (Using Mythbuntu or LinuxMCE)
  2. I'm making a full system backup of my notebook before I do a distribution upgrade from Kubuntu 8.4 to Kubuntu 8.10

Backup Software

For my purposes, I chose Mondo Rescue as my tool of choice because it is a very versatile package for complete disaster recovery as well as flexible in the ability to use online storage (e.g. external USB drive).

Archive the old workstation

These are the disks that I have to preserve by copying the good, throwing away the bad.

greg@liberty:~$ sudo fdisk -l

Disk /dev/hda: 40.0 GB, 40000020480 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/hda2            2551        2633      666697+   7  HPFS/NTFS
/dev/hda3            2634        2646      104422+  83  Linux
/dev/hda4            2647        4863    17808052+   f  W95 Ext'd (LBA)
/dev/hda5            2647        4668    16241683+  83  Linux
/dev/hda6            4669        4863     1566306   82  Linux swap / Solaris

Disk /dev/hdb: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1      158816    80043232+  83  Linux

One of the first tasks at hand was to mount my old Windows drive in a way that made it accessible to me (as opposed to read-only to root) Learn more about this at https://help.ubuntu.com/community/AutomaticallyMountPartitions

You can learn the identifier with the command:

sudo vol_id -u /dev/sda1

But it turns out there is a simpler way of finding out what the volume id is for a disk drive:

ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2008-10-21 09:32 05226929-bdde-4a46-af85-01b40827a1f4 -> ../../sda5
lrwxrwxrwx 1 root root 10 2008-10-21 09:32 8e46d1ff-5f34-46b1-a51a-0dac169123b7 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2008-10-21 09:32 c82c1eb4-439c-4982-8764-ac207d4f9622 -> ../../sda1
</source

<source lang="bash">
cat /proc/filesystems

shows you what file system types are supported under your currently running kernel

Backups for Disaster Recover

So, when it came to using a backup program, I chose Mondo Rescue because it can backup to CD, DVD, disk or other mediums. Plus, it can create a restore disk for you which is what I want... in the case of catastrophic system failure, I want to be able to recreate my computer on new hardware.

I have an external USB hard drive with a terabyte of storage that I have mounted at /media/disk

This is the command that I used to create a full system backup of my laptop hard drive to my external USB drive:

mondoarchive  \
-OV                                 #  do a backup, and verify \
-p greg-laptop                  # prefix backup files with this \
-i                                    # Use ISO files (CD images) as backup media \
-I /                                 # include from root (default) \
-N                                   # exclude all mounted network filesystems \
-d /media/disk/backups    # write ISOs to this directory \
-s 4420m                        # make the ISOs 4,420 MB is size (smaller than a DVD) \
-S /media/disk/tmp          # write scratch files to this directory 
-T /media/disk/tmp          # write temporary files to this directory

At first, the backup failed with a message that it thought my drive was full. But in reality, it was a problem with the tmp partition being too small so then I added the -S and -T options and it worked fine.

This is what mondoarchive said after I used the -T and -S options to do the run

Call to mkisofs to make ISO (ISO #18) ...OK
Please reboot from the 1st ISO in Compare Mode, as a precaution.
Done.
Done.
Writing boot+data floppy images to disk
No Imgs
---promptpopup---1--- No regular Boot+data floppies were created due of space constraints. However, you can burn /var/cache/mindi/mondorescue.iso to a CD and boot from that.
---promptpopup---Q--- [OK] ---
-->
Backup and/or verify ran to completion. However, errors did occur.
/var/cache/mindi/mondorescue.iso, a boot/utility CD, is available if you want it
Data archived OK.
Errors occurred during backup. Please check logfile.
See /var/log/mondoarchive.log for details of backup run.

Basically, I have to "reduce your kernel's size" if I want to create a boot floppy, but it doesn't matter if I want to use a boot ISO instead.