CIS 191B
Lab 8: Backup and Restore
The purpose of this lab is to
implement a backup schedule on your new cis191B VMs that will allow you to recover from a
hard disk disaster.
Part One
Creating an archve device
You will create a second disk for your cis191B Virtual machine which you will use as an
archive device. You will make partitions on the disk that will correspond to different sized
tapes onto which you will do the backups.
- Log in to CISVLAB and right click your cis191B VM choosing the Edit Settings menu option.
- In the Properties dialog, select Add... and then Hard Disk in the center column.
Click Next
- Select Create a new virtual Disk and click Next
- Specify a disk size of 5 GB and leave the default values for Disk Provisioning and Location.
- Under Advanced Option accept the default SCSI (0:1) disk, but choose a Mode of
Independent and Persistent.
- Click Finish and OK
You now have a second storage device that will be recognized by your OS as /dev/sdb.
Part Two
You will now boot up your cis191B VM in Mainetenance mode and run the fdisk -l command
to view your new device.
Since archives can be made on raw devices or as files on a filesystem, you will be creating three primary partitions as raw tape devices, and a fourth partition that will be formatted with an ext2 filesystem.
- make sdb1 ~300MB
- make sdb2 ~700MB
- make sdb3 ~2GB
- make sdb4 ~2GB
- Format the sda4 partition with an ext2 file system with 128 inodes.
Part Three: DUMP
It's time to make your level 0 backup of each of your filesystems.
- Back up the root filesystem using the dump -0 command with the output going to /dev/sdb1:
dump -0uf /dev/sdb1 /dev/sda3
- Back up the /var filesystem using the dump -0 command with the output going to /dev/sdb2:
dump -0uf /dev/sdb2 /dev/sda6
- Back up the /usr filesystem using the dump -0 command with the output compresses and going to /dev/sdb3:
dump -0uf - /dev/sda7 | gzip > /dev/sdb3
- Back up the /home filesystem using the dump command with the output going to a file on /dev/sdb4 called home0-mm-dd-yy.dmp:
dump -0uf /mnt/home0-mm-dd-yy.dmp /dev/sda9
- Back up the /dos filesystem using the tar command with the output going to a file on /dev/sdb4 called dos-mm-dd-yy.tar:
tar cvf /mnt/dos-mm-dd-yy.tar /dos
- Back up the /boot filesystem using cpio command with the output going to a file on /dev/sdb4 called boot-mm-dd-yy.cpio:
mount /dev/sda2 /boot; find /boot | cpio -vocB > /mnt/boot-mm-dd-yy.cpio
To turn in
Now verify that each backup was sucessfull by collecting the first 10 lines of the listing of each archive. Label these listings and put them in one file called lab8.
Copy the lab8 file to your account on
opus.cabrillo.edu using the following command:
scp lab8 logname@opus.cabrillo.edu:lab8