This lab will teach you how to backup and restore your system using the 'dump' utility.
Install a base system on a workstation.
You will require your install CD and a blank CD or three for this procedure.
NetBSD has different device naming habits than linux.
The cd device is not /dev/cdrom.
Run this command:
dmesg|grep cd
Write the output you see:
Mount your install CD. The mount command needs a type argument
"cd9660" and a mount point. /mnt will do for the mount point.
The device name is /dev/cd0a
Write a valid mount command (see man mount):
Change directory into /mnt. Write the list of files:
Look at man umount, and perform the steps necessary to eject the CD.
Write them out:
Get a dhcp IP. Get the file usr_dump from the ftp server at 10.100.1.150
in the dumps directory. Put this file in /var.
You can restore with /usr mounted, but it is best done in single user mode.
Research how to get to single user mode on the net.
Explain what is meant by single user mode:
Write the command to go single user and context for this command.
Restore the /usr filesystem from the backup using this command:
restore -rf /var/usr_dump
Reboot to multiuser mode.
Now make a backup of /usr using the dump command:
mkdir /var/dumps
dump -u -s 100000 -d 100000 -0f /var/dumps/usr_dump /usr
What does each option do (see man dump)?
-u
-s
-d
-0
-f
Write out the "passes" that dump goes through.
Write out the size of the dump file.
What is the utility that lets you browse a dump file? Write out the valid command to do this.
Next we burn the backup to CD. There are 2 utilities, mkisofs and cdrecord.
I have them preinstalled.
You can make an iso image of the /usr directory, or you can make an iso image
of a directory that contains the filesystem dumps.
We'll do the second procedure, assuming the dump is in /var/dumps.
Run this command with a blank CD in the drive.
mkisofs -J /var/dumps | cdrecord dev=/dev/rcd0d -Note: you cannot run this command if you are using VirtualPC, you can skip it.
Finally, unpack pkgsrc (installed to /usr/local when you restored the dump),
and install tcsh (in shells).
Where is the binary installed?
What is the file controlling valid shells for users?
Last updated: 2008-01-15
Updated by: Allan Jude
Written by: Allan Jude (2007)