It is also important to know how to restore a needed directory from any of these back-ups. Let's pretend that I have managed to delete my entire home directory. This means I need to retrieve /homes/sep/marie. The daily and weekly back-ups are created using the tar command. Therefore, to retrieve the subdirectory marie from the directory /homes/sep for a particular date from a daily back-up, I first create a temporary directory on one of koko's scratch drives, then move into that directory and run this:
tar -xvf /backup/daily/sep/DATE.tar marie. (where DATE is of the format: Apr__3_2001, or Apr_23_2001)
There are two ways to retrieve /homes/sep/marie from a weekly (or monthly) back-up. If the desired back-up is from a date less than 4 weeks old, it can be retrieved from disk by creating a temporary directory on one of kana's scratch drives and running this:
tar -xvf /backup/weekly/sep/DATE.tar marie
If the directory must be retrieved from tape, put the proper tape in kana's tape drive, create the temporary directory on one of kana's scratch drives and retrieve the weekly back-ups with this command:
bru -xvf /dev/dtapenr weekly/sep/
Actually however, we now bru both kana and koko files onto the same tape, and kana gets backed up first. As /homes/sep is now on koko, you will need to fast-forward one file on the tape first:
mt -f /dev/dtapenr fsf 1
It may be helpful to first read a directory table from the tape. Although this will take some time, use the command:
bru -tvf /dev/dtapenr
This will list the contents of only the 1 bru file that is cued up on the tape. If your files are not listed, use the fast-forward command above, or rewind with:
mt -f /dev/dtapenr rewind
The quarterly and biannual back-ups are also created using bru rather than tar. To retrieve /homes/sep/marie from one of these, put the proper tape in kana's tape drive and look at the label to determine the order of the bru files on the tape. Let's pretend that the bru file of /homes/sep is the second directory on the tape. Then tell the tape drive to fast-forward to the correct directory:
mt -f /dev/dtapenr fsf 1
Then you can get the subdirectory marie:
bru -xvf /dev/dtapenr marie
If any of this is unclear, please contact Bob Clapp or Marie Prucha.
|
Department of Geophysics Stanford University |
|