This file is /cdf/run1/documents/development/cdfsga_backup.note Last update was May 3rd, 2001 Please note that CDF data files and CDF Monte Carlo files are written to tape in a different way than the backups. Please see: http://www-cdf.fnal.gov/offline/cdfsga/cdfsga_tapes.note for more details about data tapes. Backing up miscellaneous files on tape on cdfsga ================================================ On cdfsga, to back up files on tape you need first to reserve a blank tape from the RK series of tapes. You will want to use data grade tapes for backups. (The RK series of tapes stay in the vault in the Feynman Center. The RK series of tapes are already labelled. RK0001 to RK6999 were video grade tapes. Data Grade tapes are RK7000 and up. All newly assigned tapes will be Data Grade.) To reserve a blank tape from the RK series of tapes, please use the CDF Tapes Database, available on the World Wide Web at the following URL: http://www-cdf.fnal.gov/internal/tapes/tapes.html =============================================================================== In the comment you can put all information you want. A good comment always contains the operating system version, the tool used to archive the files (in this case it is "tar"), and the name of the directory where these files belong to. =============================================================================== =============================================================================== At this point the blank tape with label RK7637 is reserved for you, for example. You then change the default directory to the one you want to archive: =============================================================================== > pwd /spool/flavia > ls -al total 187955 drwxrwxrwx 2 flavia cdf 2048 Oct 19 16:01 . drwxr-xr-x 89 cdfman cdfman 1536 Oct 19 15:57 .. -rw-r--r-- 1 flavia cdf 335 Oct 19 15:57 6j.inp -rw-r--r-- 1 flavia cdf 47521 Oct 19 15:57 MRSEB2.DAT -rw-r--r-- 1 flavia cdf 1017807 Oct 19 15:57 NJETS.OUT -rw-r--r-- 1 flavia cdf 134 Oct 19 15:57 bal.csh -rw-r--r-- 1 flavia cdf 1577 Oct 19 15:57 bla.bla -rw-r--r-- 1 flavia cdf 146 Oct 19 15:57 bla.kumac -rw-r--r-- 1 flavia cdf 46736 Oct 19 15:57 comis_scratch.dat -rwxr-xr-x 1 flavia cdf 40 Oct 19 15:57 counts -rwxrwxr-- 1 flavia cdf 420 Oct 19 15:57 cps_input.uic -rw-r--r-- 1 flavia cdf 449 Oct 19 15:57 cps_input_new.uic -rwxrwxr-- 1 flavia cdf 313 Oct 19 15:57 cps_output.uic -rwxrwxr-- 1 flavia cdf 92 Oct 19 15:57 cps_production.uic -rw-r--r-- 1 flavia cdf 89 Oct 19 15:57 cps_production_new.uic -rw-r--r-- 1 flavia cdf 61 Oct 19 15:57 deb_dat.uic -rwxr-xr-x 1 flavia cdf 1041616 Oct 19 15:57 dis.exe -rw-r--r-- 1 flavia cdf 5347 Oct 19 15:57 dis.f -rw-r--r-- 1 flavia cdf 32768 Oct 19 15:57 dis.paw -rwxr-xr-x 1 flavia cdf 63 Oct 19 15:57 dis.run -rw-r--r-- 1 flavia cdf 1167360 Oct 19 15:57 dis_njet_8.paw -rw-r--r-- 1 flavia cdf 188416 Oct 19 15:57 dis_topjj.paw -rw-r--r-- 1 flavia cdf 294912 Oct 19 15:57 dtry.paw -rw-r--r-- 1 flavia cdf 188416 Oct 19 15:57 dtry_130.paw -rw-r--r-- 1 flavia cdf 7645 Oct 19 15:57 eta_a0.ps -rw-r--r-- 1 flavia cdf 8205 Oct 19 15:57 eta_a2.ps -rw-r--r-- 1 flavia cdf 1976 Oct 19 15:57 etab.f -rw-r--r-- 1 flavia cdf 573 Oct 19 15:57 etan.f -rw-r--r-- 1 flavia cdf 104 Oct 19 15:57 expo.f -rw-r--r-- 1 flavia cdf 96 Oct 19 15:57 expox.f -rw-r--r-- 1 flavia cdf 50 Oct 19 15:57 fort.15 -rw-r--r-- 1 flavia cdf 5701 Oct 19 15:57 fort.6 -rw-r--r-- 1 flavia cdf 14 Oct 19 15:57 giele.email ....... =============================================================================== Then you setup the current ocs version: =============================================================================== > setup ocs =============================================================================== Allocate the drive for writing, and have the operators mount the tape. The ocs_request command can take up to 20 minutes or so, as the operator needs to locate and mount the tape. =============================================================================== > ocs_allocate -d exabyte_8500 cdfsga cdf16 > ocs_request -t cdf16 -v RK4802 -w ocs_request: Success > ocs_check_tape -t cdf16 -w -v RK4802 ocs_check_tape: Success =============================================================================== Find out the device file to be used, and also make a quick check that the drive is ready to go. =============================================================================== > ocs_devfile -t cdf16 -f nrns /dev/rmt/tps5d3nrns.8500 > mt -t /dev/rmt/tps5d3nrns.8500 status =============================================================================== Run the backup program (tar). This command backs up the current directory, and all subdirectories. =============================================================================== > tar cvf /dev/rmt/tps5d3nrns.8500 . a 6j.inp 1 block a MRSEB2.DAT 93 blocks a NJETS.OUT 1988 blocks a bal.csh 1 block a bla.bla 4 blocks a bla.kumac 1 block a comis_scratch.dat 92 blocks a counts 1 block a cps_input.uic 1 block a cps_input_new.uic 1 block a cps_output.uic 1 block a cps_production.uic 1 block a cps_production_new.uic 1 block a deb_dat.uic 1 block a dis.exe 2035 blocks a dis.f 11 blocks a dis.paw 64 blocks a dis.run 1 block a dis_njet_8.paw 2280 blocks a dis_topjj.paw 368 blocks a dtry.paw 576 blocks a dtry_130.paw 368 blocks a eta_a0.ps 15 blocks a eta_a2.ps 17 blocks a etab.f 4 blocks a etan.f 2 blocks a expo.f 1 block a expox.f 1 block a fort.15 1 block a fort.6 12 blocks a giele.email 1 block ... =============================================================================== Make sure that the files are on the tape, asking for a listing: =============================================================================== > mt -t /dev/rmt/tps5d3nrns.8500 rewind > tar tf /dev/rmt/tps5d3nrns.8500 6j.inp MRSEB2.DAT NJETS.OUT bal.csh bla.bla bla.kumac comis_scratch.dat counts cps_input.uic cps_input_new.uic cps_output.uic cps_production.uic cps_production_new.uic deb_dat.uic dis.exe dis.f dis.paw dis.run dis_njet_8.paw dis_topjj.paw dtry.paw dtry_130.paw eta_a0.ps eta_a2.ps etab.f etan.f expo.f expox.f fort.15 fort.6 giele.email .... =============================================================================== Once you are sure that your files are on the tape, then rewind, unload and deallocate the tape. =============================================================================== > mt -t /dev/rmt/tps5d3nrns.8500 rewind > mt -t /dev/rmt/tps5d3nrns.8500 unload > ocs_deallocate -t cdf16 ocs_deallocate: Deallocated any:cdf16 =============================================================================== In some cases, you may now wish to delete your files from the disk: =============================================================================== > pwd /spool/flavia > rm * > ls -al total 7 drwxrwxrwx 2 flavia cdf 2048 Oct 20 15:42 . drwxr-xr-x 89 cdfman cdfman 1536 Oct 19 15:57 .. =============================================================================== Restoring archived files ======================== To restore archived files from a tape, you need to allocate a tape drive first and then mount the tape: =============================================================================== > ocs_allocate -d exabyte_8500 cdfsga cdf10 > ocs_request -t cdf10 -v RK4802 -r ocs_request: Success > ocs_devfile -t cdf10 -f nrns /dev/rmt/tps6d1nrns.8500 > mt -t /dev/rmt/tps6d1nrns.8500 status > cd /spool/$USER/restore > tar xvRf /dev/rmt/tps6d1nrns.8500 x 6j.inp, 335 bytes, 1 block x MRSEB2.DAT, 47521 bytes, 93 blocks x NJETS.OUT, 1017807 bytes, 1988 blocks x bal.csh, 134 bytes, 1 block x bla.bla, 1577 bytes, 4 blocks x bla.kumac, 146 bytes, 1 block x comis_scratch.dat, 46736 bytes, 92 blocks x counts, 40 bytes, 1 block x cps_input.uic, 420 bytes, 1 block x cps_input_new.uic, 449 bytes, 1 block x cps_output.uic, 313 bytes, 1 block x cps_production.uic, 92 bytes, 1 block x cps_production_new.uic, 89 bytes, 1 block x deb_dat.uic, 61 bytes, 1 block x dis.exe, 1041616 bytes, 2035 blocks x dis.f, 5347 bytes, 11 blocks x dis.paw, 32768 bytes, 64 blocks x dis.run, 63 bytes, 1 block x dis_njet_8.paw, 1167360 bytes, 2280 blocks x dis_topjj.paw, 188416 bytes, 368 blocks x dtry.paw, 294912 bytes, 576 blocks x dtry_130.paw, 188416 bytes, 368 blocks x eta_a0.ps, 7645 bytes, 15 blocks x eta_a2.ps, 8205 bytes, 17 blocks x etab.f, 1976 bytes, 4 blocks x etan.f, 573 bytes, 2 blocks x expo.f, 104 bytes, 1 block x expox.f, 96 bytes, 1 block x fort.15, 50 bytes, 1 block x fort.6, 5701 bytes, 12 blocks x giele.email, 14 bytes, 1 block ..... =============================================================================== Once your files are on disk, please rewind, unload and deallocate the tape. =============================================================================== > mt -t /dev/rmt/tps6d1nrns.8500 rewind > mt -t /dev/rmt/tps6d1nrns.8500 unload > ocs_deallocate -t cdf10 ocs_deallocate: Deallocated any:cdf10 =============================================================================== If you just need to extract one file: > ocs_allocate cdfsga cdf10 > ocs_request -t cdf10 -v RK4802 -r ocs_request: Success > ocs_devfile -t cdf10 -f nrns /dev/rmt/tps6d1nrns.8500 > tar xvRf /dev/rmt/tps6d1nrns.8500 The "R" option in the tar command ignores leading slashes on file names, i.e., extracts all files relative to the current directory. Sometimes one will need to write out the filename wanted from tape with the directory included, as for example: paw_directory/dis.paw (The listing command > tar tf /dev/rmt/tps6d1nrns.8500 can provide guidance if one is unsure.) Once you got your files, deallocate the tape drive. Please, do not forget to do so: > ocs_deallocate -t cdf10 ocs_deallocate: Deallocated any:cdf10 NOTE: The ocs_request command can take sometime, since the operator at FCC has to physically mount the tape in the drive.