Chemical Visualization Facility
Several shell scripts have been written to simplify the task of backing up files to the DAT tape drive on london. The commands for using the DAT drive are:
| Command | Description |
|---|---|
| dat | create a new tape and backup files |
| dat_append | append files to an existing backup tape |
| dat_list | list the files on a backup tape |
| dat_restore | restore files from a backup tape |
These commands will work on all of the SGI machines in the visualization cluster. However, the backup may work faster if the commands are run on argus or london.
Here are some suggestions and points to keep in mind:
To use the commands, first insert a DAT tape into the drive on london, then run the command. Wait for the command to complete before removing the DAT tape from the drive. You may make copies of any of these shell scripts and modify them to suit your specific needs; the scripts are located in /usr/local/bin. The rest of this document contains examples and a more detailed description of each command.
NAME: dat USAGE: dat [files] DESCRIPTION:
dat copies files to the DAT tape drive on london, overwriting any previous information on the tape. The files listed on the command line may be files or directories, and may contain wildcards. If no files are listed on the command line, dat will recursively copy all files in the current directory and all subdirectories. Each file is listed on the screen as it is being backed up.
The files/directories specified on the command line may be full pathnames (beginning with a "/") or relative to the current directory. The files will be stored on the tape with the path as it was specified on the command line; this can be an important consideration when restoring.
EXAMPLES: 1. dat In this example, the dat command will backup all files in the current directory and all subdirectories using relative pathnames. 2. dat /home/argus2/people/joe (assume this is a directory) In this example, the dat command will backup all files in the directory named "/home/argus2/people/joe" and all of its subdirectories using full pathnames. 3. dat *.c datafile /scratch/joe/images/3d In this example, the dat command will backup all files in the current directory ending with ".c" and the file named datafile using relative pathnames; it will also backup all files and subdirectories in /scratch/joe/images/3d using full pathnames.
NAME: dat_append USAGE: dat_append [files] DESCRIPTION:
dat_append copies files to the DAT tape drive on london, appending them to the end of a previously created backup tape. This command works exactly the same as the dat command, except that it appends the files to the end of existing data rather than starting at the beginning of the tape.
NAME: dat_list USAGE: dat_list DESCRIPTION:
dat_list displays the name of each file stored on a tape. There are no options to this command.
NAME: dat_restore USAGE: dat_restore [files] DESCRIPTION:
dat_restore copies files from the DAT tape drive on london to the disk, overwriting any files with the same names. Care must be taken to avoid overwriting valuable files on disk. The files listed on the command line may be files or directories, and must exactly match the names of the files to be restored; wildcards cannot be used. If no files are listed on the command line, dat_restore will restore all files on the tape, but will ask for confirmation before doing this.
dat_restore will also ask if it should restore files to their original locations. If files are restored to their original locations, they will overwrite any files on the disk with the same names. If the files are restored relative to the current directory, the leading "/" (present only if full pathnames were used when backing up) will be stripped off the filenames before they are written to disk. This will cause the files to be restored relative to the current directory, but they will still overwrite any files with the same names.
EXAMPLES: 1. dat_restore In this example, the dat_restore command will copy all files from the tape to the disk. 2. dat_restore /home/argus2/people/joe In this example, the dat_restore command will restore all files and subdirectories on the tape that were backed up from the directory named "/home/argus2/people/joe". 3. dat_restore home/argus2/people/joe In this example, the dat_restore command will restore all files and subdirectories on the tape that were backed up from the directory named "/home/argus2/people/joe", but they will be restored relative to the current directory (the leading "/" will be removed). You must also answer "n" to the question regarding restoring files to their original locations. 4. dat_restore datafile /scratch/joe/images/3d In this example, the dat command will restore the file named datafile and all files and subdirectories that were backed up from /scratch/joe/images/3d.
|
Last Updated: October 3, 2003
URL: http://www.chemistry.msu.edu/Facilities/ Computing/Vis_Fac/dat_utils.shtml |4.01|css|508|A|[D] |
Research | Graduate Program | Undergraduate Program People | Facilities & Centers | Safety | Course Information News & Events | Other Information | Alumni News | Search MSU Home | MSU Chemistry Home | Contact Us | Site Index |