How to back up your UNIX project disk at FNAL


Using Computing Divisions ocs and fmb packages, I (John Krane) have written a set of scripts to let you back up your disk drives with a few keystrokes each week. The data from your disk drive(s) will be copied to tapes you place in the permanent tape vault at the Feynman Computing Center.

Here's how:

  1. Acquire some 8mm "exabyte" tapes and official tape label names (called VSN's). As an example, Lee Lueking has taken on the responsibility of assigning tape names for all of DZero. If you are a member of DZero, send your request to Lee (lueking@fnal.gov) with the following info:
  2. Label each tape on the edge with the VID, then label the top of the tape with the following info:
  3. Fill out a vault request form (available at FCC or I have an sample form). To add your tapes to the FCC vault, go to the back side of the FCC building. Looking from the parking lot, on the right side of the building, proceed straight through the two sets of doors, and go to the window. (You'll feel like you're ordering take-out...) Just pick up the phone if nobody is there. (During construction at Feynman, use the door on the left side of the building, and then the phone by the door in front of you).
  4. Create a file .rhosts if you don't have one in your home area already. Do man .rhosts at the command line for more info. This file will (among other things) let you do backups of disks that are mounted on one machine but are accessible to all machines; this step makes the NSF mounting transparent to you. You will need this file on each machine that has its own drive system. (At DZero, you want to put the file in your home areas on d0cha or d02ka.)
  5. Create a directory (on d0cha or d0mino) from which you wish to operate the scripts. Add the line setup kback to your .login file (do it at the command line also, first time).
  6. From your backup directory, create a logs subdirectory, then copy the input file to your area:
    mkdir logs
    cp $KBACK_DIR/x_backup.input
  7. Edit x_backup.input to reflect your information instead of the example. This is self-explanatory if you look at the file. You need LSF batch privileges to run the script in its current form. (All I mean is: you need to be able to submit batch jobs to a queue.) If you don't have LSF privs, you should request them from D0 Operations Team (d0-team@fnal.gov). Congratulations, you are now ready to use the utility!
  8. When you run with brand new tapes, you must label them first. Go to your backup directory and type klabel to assign the internal ID of each tape to match its external VSN. This is automated and extracts the info from your x_backup.input. It will take several hours to cycle through several tapes, log files will appear in your log directory or you can monitor the batch jobs with bjobs, bpeek etc.
  9. When you want to back up the drives that you listed in the input file, go to your backup directory and type
    kback 1
    The 1 argument backs up all drives on your sequence 1 tapes. A 2 would give you sequence 2. You can add sequence 3 or 4 lists to x_backup.input if you wish. If you want redo a single tape's backup (because of an odd failure, for instance), type
    kback x prqy99
    The x says to back up only one tape. The prqy99 is an example of a tape VSN. Replace it with your VSN when you do this command! The script will search through the input file and put the proper data on that tape.

The scripts put a file called .lastfull.d0cha (or d0mino, etc) in the top of each main directory it backs up. This indicates to everyone the date of the last full backup. If you don't have privilege to write to a directory you backup, you'll get an error message to that effect in the log file, but the backup will be successful.

The scripts will send you mail as they finish. Always check the logfiles for funny errors. The scripts attempt to self-diagnose, but somebody needs to look at the file.

If you want to monitor the progress of your jobs, try the commands bjobs (get a list of your batch jobs, running and pending), bpeek n (look at output of batch job number n), and ocs_tape (list tape drives available on this machine and who is using them).

Questions? Send mail to John Krane (jkrane@fnal.gov). Want to look at the scripts yourself? After you setup kback, look in $KBACK_DIR . Have some suggested changes? Definitely let me know.

John Krane (jkrane@fnal.gov)

Version history

v1.0 Official release, scripts will:

The scripts will not:

v2.0 Many little fixes to handle exceptional cases:


Common problems


Any questions or problem reports should be reported to the
D0 Operations Team (d0-team@fnal.gov)
Last modified: Wed Aug 25 17:15:53 CDT 1999