60 MB Tape Drive (250-4079A) Commands Faxback Doc. # 5844 COMMAND OPERATION INTRODUCTION Command operation offers greater versatility than menu operation. It allows you to restore files from one directory on tape to another in your file system, and to change the names of file names while restoring from a tape. Tape commands can be used in script files. In general, the command syntax parallels the format used in standard UNIX/XENIX commands. FORMAT NOTES 1) All backup system commands consist of the word "jtape" and the command name; for example, jtape backup. These command sequences are called keywords and must be entered exactly as shown. To be consistent with UNIX/XENIX command format, keywords must be entered in lower-case. NOTE: A space MUST separate all keywords from any variables and options which follow them on the command line. A space MUST also separate the source and destination portions of a Restore or Compare command. See the examples in this chapter for the proper format of each command. 2) Items shown in square brackets [] are optional. Do not type the brackets as part of the optional parameters. 3) An ellipsis [...] indicates that a parameter may be repeated as many times as necessary. 4) All punctuation, just like keywords, must be entered where indicated in the command. This includes periods, colons, equal signs, double quotes, slashes, back slashes, and dashes. COMMAND PARAMETERS path => a group of directories the system walks through to locate a sub- directory, file, or group of files. The format for the path is: [/][directory name/][directory name/][...] An initial slash (/) indicates that the path begins at the root directory. Otherwise, the path begins at the current directory. For the tape software, the path must always end with a slash so the backup system can distinguish between references to subdirectory names and file names. The path CANNOT contain global file characters. files => file name. Composed of one to 14 characters. Global characters are permitted in file names. NOTE: If a global character appears in a file name, the full name must begin and end with quotation marks ("). If quotation marks are absent, the search ends and an error message is displayed. GLOBAL FILE CHARACTERS As with the shell, global or "wildcard" characters may be used in file names to specify a generalized description which selects a group of files that fit the generalized form. The global characters, ? and * are explained in your shell manual. NOTE: Unlike the UNIX/XENIX ls routine, the * wildcard character identi- fies ALL files, including hidden files, fitting the file description. (Hidden files are those beginning with the . character.) BACKUP SYSTEM COMMANDS Refer to the Options section beginning on page 3-7 for a description of the options listed with each command. backup Performs a total or selective backup of disk files. SYNTAX: jtape backup [path][files] [-a][-b][-c][-d][-e][-f][-h][-j][-l][-p][-s][-t] NOTE: Refer to the Options section in this chapter for an explanation of the command options. EXAMPLE backup COMMANDS: jtape backup "/*" -s -t "total backup" Performs a total backup and adds a volume title. jtape backup /spread/ -d "4-25-90" -np Backs up all files in the directory /spread written on or after April 25, 1990, and does not display the file names on the screen as they are backed up. Note that it is absolutely necessary to put a slash after the directory name spread to tell the backup system that you are referring to a directory and not a file. jtape backup -a -nc -f "TEMPLIST.TAG" -np -t "selective backup" Performs a Selective Backup of the files specified in the temporary file TEMPLIST.TAG, appends this volume to the others on the tape, does not execute a second-pass verification, does not display the file names on the screen as they are backed up, and adds a volume title. compare Compares files on a tape to files on a disk. Only disk files that have been modified or deleted are reported. Files that have been added to the disk are not reported, because the comparison priority is tape-to- disk. SYNTAX: jtape compare [source path][files] [destination path] [-b][-d][-l][-h][-p] [-s][-v][-w] NOTE: Refer to the Options section in this chapter for an explanation of the command options. EXAMPLE compare COMMANDS: jtape compare /letter/ -d "02-15-89" -v "17" This example compares all files in the /letter directory in volume 17 on the tape that were modified or added on or after February 15, 1989 to files in the same directory on the default drive. jtape compare /pgms/ /pgr/source/ -p -ns Compares matching files in the tape directory /pgms to those only in /pgm/source and displays the file names on the screen as they are compared. Since no volume number is specified, the tape system defaults to volume 1. crt Helps you position the external tape drive, crt, crt monitor, or other devices in a location where electrical interference to the tape drive is minimized. SYNTAX: jtape crt erase Erases all data from a tape. The default option is -q. SYNTAX: jtape erase [-h][-n][-q] format Formats a tape for use with the backup system. SYNTAX: jtape format [-h][-n] restore Performs a Total or Selective restoration of file from a tape volume to a disk. SYNTAX: jtape restore [source path][files] [destination path] [-b][-d][-h][-l][-o] [-p][-s][-u][-v][-w] NOTE: Refer to the Options section in this chapter for an explanation of the command options. EXAMPLE restore COMMANDS: jtape restore /finance /oldwork/ -s Restores all files and subdirectories from the tape directory /finance to the directory /oldwork. Note that a space is necessary between the source and destination portions of the command. jtape restore "/text/*txt" /words/ -no -p -ns -v "2" -w Restores all files from tape volume 2 that end with the three characters "txt" from the tape directory /text/ to /words, does not overwrite files in the file system of the same name, displays the file names on the screen as they are restored, and makes -no and -p the backup system defaults for those options. retension Winds the tape from end-to-end applying even tension to the entire tape. Retension tapes before all backups and formats and before using new tapes and tapes that have been stored or used heavily. SYNTAX: jtape retension [-h] search Provides a directory of a tape, any portion of a tape, or any group of files on a tape. SYNTAX: jtape search [path][files][-d][-h][-l][-p][-s][-v][-w] NOTE: Refer to the Options section in this chapter for an explanation of the command options. EXAMPLE search COMMAND: jtape search "/main/*txt" -v "3" -ns Searches volume 3 on the tape for files that end with the characters "txt" in the directory "main", but not in its subdirectories. The files fitting the description are displayed. setups Allows you to view or change the backup system default options in TAPE.CFG without performing a tape operation. To change any default options, YOU MUST INCLUDE -w on the "jtape setups" command line. To view the current default options, enter "jtape setups" at the shell prompt and press RETURN. SYNTAX: jtape setups [-a][-c][-h][-j][-o][-p][-s][-u][-w] verify Verifies that the tape is readable. SYNTAX: jtape verify [-b][-h][-p][-v][-w] OPTIONS See the command syntax listings for the options available with a given command (beginning page 3-3). Some options have a corresponding negate option -nx, where the x stands for the letter of that option. The negate form reverses the operation of an option. -a, -na -a adds the current backup at the end of the previous volume VALID COMMANDS: jtape backup, jtape setups EXAMPLE COMMAND: jtape backup "/*" -a -b "filename" -b "filename" makes an error log file to contain all errors created during an operation and gives it the name you have typed in the quotes. For example, -b "badlist.log" creates the error log file badlist.log. -c, -nc -c executes a second pass immediately after backup to verify that the tape is readable and compares the files recorded on the tape to those on the source file system. -nc turns off the automatic comparison feature. VALID COMMANDS: jtape backup, jtape setups EXAMPLE COMMAND: jtape backup "/*" -c -d "mm-dd-[yy]yy" Tape operations apply only to those files written on or after the specified date. The parameters inside quotation marks indicate a month, day, and year respectively. The date must be ON OR AFTER JANUARY 1, 1970. (When entering the year, the first two digits are optional.) The -d option CANNOT be used in combination with the -e option. Use of the -d and -e options together will result in an error. VALID COMMANDS: jtape backup, jtape compare, jtape restore, jtape search EXAMPLE COMMAND:jtape backup "/*" -d "4-25-89" -e Creates a total backup of the given path. If no path is given, the current working directory is the default value, and supervisor permissions may be required. The given (or default) path becomes the path used for modified backups after this total backup and until the next total backup. The current date and time and date are saved so that future modified backups will save files modified after this backup. Use of -e with the -d or -m options will result in an error. VALID COMMANDS: jtape backup EXAMPLE COMMAND: jtape backup "/usr/george/" -e -f "filename" Allows you to perform a Selective Backup from a command line. Enter the name of the file containing the desired Selective Backup information in the "filename" portion of this option. This file can be edited using ASCII editor and must follow the format of TEMPLIST.TAG. See pages 3-13 and 3-14 for more information. VALID COMMANDS: jtape backup EXAMPLE COMMAND: jtape backup -f "TEMPLIST.TAG" -h Displays help information. Enter -h as the only option with any command to list the options valid with that command. No tape operation is executed with -h. VALID COMMANDS: jtape backup,˙jtape compare,˙jtape erase, jtape format, jtape restore,˙jtape search, jtape setups, jtape verify EXAMPLE COMMAND: jtape backup -h -i Turns off the tape linking question. With data compression ON (-j), this option allows a backup to begin immediately that, if uncompressed, would exceed the capacity of a single tape. The backup process is not interrupted to ask you if tape linking is desired. This option has no effect if data compression is turned off. VALID COMMANDS: jtape backup EXAMPLE COMMAND: jtape backup "/*" -i -j -j, -nj -j turns on data compression for the backup. Compressed files are automatically detected during Compare and Restore operations. Refer to the discussion of Data Compression beginning on page 2-21. The -nj option turns off data compression. VALID COMMANDS: jtape backup EXAMPLE COMMAND: jtape backup "/*" -j -l "password" Allows you to password protect a backup of to restore a password-protected tape volume. Enter up to eight characters. Passwords are case sensative. MYbackup, MYBACKUP, and mybackup are each different passwords. VALID COMMANDS: jtape backup, jtape compare,˙jtape restore, jtape search EXAMPLE COMMAND: jtape backup "/*" -l "mybackup" -m, -nm -m A Modified Files Only Backup. Backs up only those files in the path of your last Total Backup that have been modified since the last backup. -nm allows all files, modified or not, to be backed up. The -m option CANNOT be used in combination with the -e option. Use of the -m and -e options together will result in an error. -n "tape name" This option writes a tape name of up to 11 characters on the tape header. VALID COMMANDS: jtape format, jtape erase EXAMPLE COMMAND: jtape erase -n "daily" -o, -no -o allows the backup system to overwrite files that exist on disk during a restore. If a file exists in the files system and on the tape when a restore is performed with this option specified, the file in the file syste is over- written with the specified file on the tape. -no turns the overwrite feature off. Existing disk files are then not overwritten by files of the same names on the tape. VALID COMMANDS: jtape restore, jtape setups EXAMPLE COMMAND: jtape restore "/*" -o -p, -np -p causes the file names to be displayed on the screen as they are backed up, restored, compared, or verified. -np turns off file name display. VALID COMMANDS: jtape backup, jtape compare, jtape restore,˙jtape search, jtape setups, jtape verify EXAMPLE COMMAND: jtape backup "/*" -p -q, -nq -q is the Quick Erase feature which erases the tape directory making tape data accessible. This is the default setting if no option is selected. -nq is the Security Erase feature which deletes the tape directory and ALL OTHER data on the tape to eliminate any possibility of recovering the information. VALID COMMANDS: jtape erase EXAMPLE COMMAND: jtape erase -nq -s, -ns -s causes the tape operation to apply to any subdirectories of the specified path and their contents. The backup system searches for matching files in subdirectories at all levels below the selected directory. All matching files and subdirectories at all levels below the selected directory. All matching files and subdirectories are subject to the tape operation specified. Only directories containing matching files are put on the tape. -ns causes tape operations to apply only to the specified path or to the currently logged directory. VALID COMMANDS: jtape backup,˙jtape compare,˙jtape restore,˙jtape search, jtape setups EXAMPLE COMMAND: jtape backup "/*" -s -t "comment" Allows you to add a comment that is displayed on the volume title of the backup. The comment length is limited to 44 characters and will be truncated if it exceeds this limit. VALID COMMANDS: jtape backup EXAMPLE COMMAND: jtape backup "/*" -t "daily total backup" -u, -nu -u When a file is restored, the owner and group identification are restored as they appear on the backup volume. -nu assigns owner and group identification to the user restoring data. VALID COMMANDS: jtape restore, jtape setup EXAMPLE COMMAND: jtape restore "/*" -u -v "n" Fill in "n" with the number of the desired volume on the tape, from 1 to 256 inclusive. If you do not know the number of the desired volume, use the jtape search command with -v option to list the volumes on the tape in numerical order. VALID COMMANDS: jtape compare,˙jtape restore,˙jtape search, jtape verify EXAMPLE COMMAND: jtape search "/*" -v "2" -w Provides access to default settings contained in the TAPE.CFG file. If you include -w on a command line, the options specified on that line become the default settings for the backup system. The default setting will not be changed unless -w is specified on the command line. A command with -w as the only option displays the defaults currently set. The factory defaults in the TAPE.CFG file are: Backup only modified files: N (-nm) Overwrite on restore: N (-no) Print file names: Y (-p) Automatic compare after backup: N (-nc) Use subdirectories: Y (-s) Multi-volume backup: Y (-a) Compress file data: N (-nj) Restore user and group ID: Y (-u) VALID COMMANDS: jtape backup,˙jtape compare,˙jtape restore,˙jtape search, jtape setups, jtape verify EXAMPLE COMMAND: jtape backup "/*" -a -w TEMPLIST.TAG Each time a Selective Backup is performed with the Menu software the tag parameters are saved in the temporary ASCII file TEMPLIST.TAG. This file is overwritten with each new Selective Backup. TEMPLIST.TAG can be edited with any ASCII text editor. To save a set of tag parameters permanently, simply rename TEMPLIST.TAG to any other valid file name using the DOS filename format: up to eight characters, an extension of up to three characters, and all letters in upper case. Enter the new name in the "filename" portion of the -f option. NOTE: The filename TEMPLIST.TAG must be entered in all UPPERCASE letters. Locate the file in the /usr/bin directory. TEMPLIST.TAG FORMAT SYNTAX: [/]path/[filename][-d "mm-dd-[yy]yy"][-e "mm-dd-[yy]yy"][-m][-s][-x] path/filename If no leading slash is included, the path is taken from the current directory level. If only a path is specified, it must be terminated by a slash. The filename portion can contain any combination of valid characters including wildcard characters. -d "mm-dd-[yy]yy" Beginning date. Files dated on or after the date entered are selected. The two Year digits in square brackets are optional. -e "mm-dd-[yy]yy" Ending date. Files dated on or before the date entered are selected. The two Year digits in square brackets are optional. -m Affects only those files selected by the previous parameters that fall within the path of the last Total Backup and have been modified since the last backup. -s Extends the path into all subdirectories of the current directory. -x Excludes all files that meet the previous parameters. (smm 08/05/93) (smm 08/26/93)