EDITING A PARAMETER FILE USING A TEXT EDITOR If you are not familiar with parameter files, we recommend that you first read the chapter in your EzTape User's Manual that discusses this topic before proceeding. In general, it is easier to create parameter files from within the EzTape menu system. However, EzTape provides a way for you to create or edit a parameter file by using a text editor at the command prompt. The general procedure for editing a parameter file is as follows: 1. Use a text editor to open the file. 2. Type in the commands for the parameter file to perform, using EzTape's parameter file format, as described below. 3. Save the parameter file under a unique file name. We recommend that you add a .TPF extension to identify the file as a parameter file. **** Parameter File Format **** The basic format of parameter file is: [mode] [option_list] You use the mode variable to specify the type of command you want to run with the parameter file: Mode: Meaning: ----------------------------------------------- !backup perform a backup !restore perform a restore from tape !library perform a restore from library !init perform a tape initialization !util perform a tape utility !shortcut perform a shortcut operation When you type the mode variable, you only need to use the exclamation point and first letter of the mode. For example, type "!b" to indicate "!backup." The mode variable is followed by a list of options associated with that command. These options are equivalent to the choices that you make when you set up an operation interactively, through the EzTape menu system. Some options require a variable. If you use these options, make sure to enter a space between the option and the variable. The syntax for the option list depends on the specific mode used. The sections below describe the options for each mode. Note: In most cases, if you do not include an option in the parameter file, that option is turned off. Exceptions to this rule are noted in the option lists below. ================================================================== Backup Mode Use the following syntax for !backup mode commands: !b[ackup] [mode_options] [select_options] /s file_spec First type the !b command (with the rest of word optional), followed by the mode options, if any. Then, type the selection options that will apply to the file specification, followed by the /s option and the full path of the files to be included in the backup. If you are specifying more than one drive to be backed up, you may list separate selection options for each drive. Type the selection options for the first drive, followed by its file specification. Then list the selection options for the second drive, followed by its file specification, and so on. Note that the mode options are global; they apply to all drives. Mode Options The mode options are equivalent to the choices available when you select the Options... button in the Backup Set Parameters window. You may have only one set of mode options in the parameter file. These options will apply to the entire parameter file, even if it includes multiple volumes. Listed below are the valid mode options for !backup mode: /l log_name [xi] Creates a log for messages during this operation. Put a legal file name for your log for the log_name variable. If you want to include a list of files excluded from the operation due to errors, use the x variable. If you want to include a list the files that were included in the operation, use the i variable. /m Scans marked files before performing the operation. /u Sets the tape to unused before backup. Make sure that you do not need the data on the tape before you use this option. /w [0fcnso] Sets the wait on error option. When you use this option, the operation will pause at a situation that you specify and wait for you to select a continue, retry, or cancel option. You can choose to wait at one or more of the following: 0 (zero) no wait f file sharing error c critical error n non-critical error s split/full tape o completion of operation If you do not include the /w option, the parameter file will default to the wait option currently set in the Backup Set Parameters window. /x "bs_name" Overwrites a backup set, where the variable bs_name represents the backup set name. If the backup set name contains a space, you must place quotation marks around it. (Not available for use with streaming tape drives such as the Irwin 7000 and 9000 Series, or the A850.) Selection Options The selection options are equivalent to the choices available in the Backup Set Parameters window. You can specify a set of selection options for each drive in the backup. Listed below are the valid selection options for !backup mode: /a Backs up modified files only. /b [type] Includes files according to their file attributes: r includes read-only files h includes hidden files s includes system files To use this option, you must enter two /b options. The first /b resets the file attribute inclusion bits. Use the second /b to turn on the inclusion bits of the attributes you wish to select. For example, the option /b /b rh tells EzTape to reset the inclusion bits, then include files with read-only and hidden attributes. /c [0, 1, or 2] Sets the compression level: 0 no compression 1 minimum compression (approx. 1.2:1) 2 maximum compression (approx. 2:1) If you do not include the /c option, the parameter file will default to the compression level currently set in the Backup Set Parameters window. /d date_spec date [time] Chooses a date specification. The date_spec variable can have one of the following values: ge or >= greater than or equal to gt or > greater than eq or = equal lt or < less than le or <= less than or equal to ne or <> not equal The date variable must be in this format: mm/dd/yy. For example, 02/15/91. The time variable is optional. It must be in the following format: hh:mm. For example, 13:30 (equals 1:30 PM). /g Adds this backup set to the library. /i "backup_comments" Includes backup remarks. The remarks can be a maximum of 127 characters. If the remarks contain a space, you must place quotation marks around them. /n "bs_name" Assigns a name to the backup set. The name can be a maximum of 31 characters. Do not use characters that are illegal for a file name. (For example, do not use the symbols : \ * ? .) If the backup set name contains a space, you must place quotation marks around it. If you do not use this option to set a name, EzTape will name the backup set according to its source drive. For example, DRIVE C. /q Include the subdirectories for a selected directory. /r Resets the archive bits. This option will reset the archive bit to off for each file you are backing up. This lets the operating system and EzTape know that the file has been backed up. If you later change a file, its archive bit will automatically be turned back on. /v Verifies after backup. This option causes EzTape to perform a byte-by-byte comparison between the tape data and hard disk data. (Not available for use with streaming tape drives such as the Irwin 7000 and 9000 Series, or the A850.) File Specification Use the /s option to tell EzTape what files to include in the backup. You must include a file specification in the backup parameter file, or else the operation will not take place. Type the file specification in this format: /s file_spec The file_spec variable marks and unmarks files. Put the full path of the file(s) you want to mark or unmark for this variable. If you precede a file_spec with a minus (-) sign, it will unmark the files in the path. You can use as many /s options as necessary to select your files, including file specifications for different volumes. The order you put /s commands is important. In the first example, all files on drive C are marked except those in the TEST directory. In the second example, all files are marked. Example 1: !b /s C:\*.* /s -C:\TEST\*.* Example 2: !b /s -C:\TEST\*.* /s C:\*.* Example 3: !b /w s /q /c 1 /d = 04-15-91 17:00 /n APRILBACKUP /s C:\*.* /s -C:\*.EXE In Example 3, the backup will: * pause if the tape is full before the backup is finished * include subdirectories of the directories marked for backup * use level 1 compression * only back up files with the exact date and time of 4/15/91 at 5:00 PM * assign a backup set name of APRILBACKUP * include all files on drive C except files with the extension .EXE ================================================================== Restore and Library Modes Use the following syntax for !restore and !library mode commands: !r[estore] [mode_options] [select_options] /s file_spec !l[ibrary] [mode_options] [select_options] /s file_spec First type the !r or !l command (with the rest of word optional), followed by the mode options, if any. Then, type the selection options that will apply to the file specification, followed by the /s option and the full path of the files to be included in the operation. If you are specifying more than one backup set to be included in the operation, you may list separate selection options for each. Type the selection options for the first backup set, followed by its file specification. Then list the selection options for the second backup set, followed by its file specification, and so on. Note that the mode options are global; they will apply to all backup sets. Mode Options The mode options are equivalent to the choices available when you select the Options... button in the Restore Parameters window. You may only have one set of mode options in the parameter file. Mode options apply to the entire parameter file, even if it includes multiple volumes. Listed below are the valid mode options for !restore and !library modes: /l log_name [xi] Creates a log for messages during the operation. Put a legal file name for the log_name variable. If you want to include a list of files excluded from the operation due to errors, use the x variable. If you want to include a list the files that were included in the operation, use the i variable. /m Scans marked files before performing the operation. /w [0fcnso] Sets the wait on error option. When you use this option, the operation will pause at a situation that you specify and wait for you to select a continue, retry, or cancel option. You can choose to wait at one or more of the following: 0 (zero) no wait f file sharing error c critical error n non-critical error s split/full tape o completion of operation If you do not include the /w option, the parameter file will default to the wait option currently set in the Restore Parameters window. Selection Options The selection options are equivalent to the choices available in the Restore Parameters window. You can specify a set of selection options for each backup set in the operation. Listed below are the valid selection options for !restore and !library modes: /b [type] Includes files according to their file attributes: r includes read-only files h includes hidden files s includes system files To use this option, you must enter two /b options. The first /b resets the file attribute inclusion bits. Use the second /b to turn on the inclusion bits of the attributes you wish to select. /d date_spec date [time] Chooses a date specification. The date_spec variable can have one of the following values: ge or >= greater than or equal to gt or > greater than eq or = equal lt or < less than le or <= less than or equal to ne or <> not equal The date variable must be in this format: mm/dd/yy. For example, 02/15/91. The time variable is optional. It must be in the following format: hh:mm. For example, 13:30 (equals 1:30 PM). /k [0 or 1] Chooses whether or not to keep the directory tree. If you put /k 0, the directory tree will not be kept. If you choose /k 1, EzTape will restore the directory tree. If you do not include the /k option, the parameter file will default to the keep tree option currently set in the Restore Parameters window. /o [0, 1, or 2] Sets the file overwrite level. If you use: 0 newer files will not be overwritten 1 you will be prompted if a newer file exists 2 all files will be restored If you do not include the /o option, the parameter file will default to the overwrite level currently set in the Restore Parameters window. /p [0, 1, or 2] Sets how trustee rights are restored for a Novell network: 0 do not restore any trustee rights 1 restore target directory rights only 2 restore rights to all directories in the target path If you do not include the /p option, the parameter file will default to the trustee level set in the Restore Parameters window. /q Includes the subdirectories for a selected directory. /t target_dir Chooses the directory path you want to restore the files to. File Specification Use the /s option to tell EzTape what files to include in the restore. You must include a file specification in the parameter file, or else the operation will not take place. Type the file specification in this format: /s file_spec The file_spec variable marks and unmarks files. Put the backup set and path of the file(s) you want to mark or unmark for this variable. If you are using the !library command, include the tape volume name. If you precede a file_spec with a minus (-) sign, it will unmark the files in the path. You can use as many /s options as necessary to select your files, including file specifications for different backup sets. The order you put /s commands is important. In the first example, all files on backup set Daily are marked except those in the TEST directory. In the second example, all files are marked. Example 1: !r /s Daily:\*.* /s -Daily:\TEST\*.* Example 2: !r /s -Daily:\TEST\*.* /s Daily:\*.* Example 3: !r /w sco /l RESTORE.LOG /t C:\ /k 1 /o 0 /b /b rhs /q /s BS1\*.* /t D:\ /k 1 /b /b r /q /s BS2\*.* In Example 3, the parameter file will: * pause if the backup set spans a split tape * report messages in a log file called RESTORE.LOG * restore backup set BS1 to drive C, keeping the directory structure, including read-only, hidden and system files, and all subdirectories. If the restore encounters a newer file on the hard disk, it will prompt before overwriting. * restore backup set BS2 to drive D, keeping the directory structure, including read-only files, and all subdirectories. For this backup set, the overwrite level is whatever is currently set under Options... in the Restore Parameter window in the EzTape menu system. ================================================================== Shortcuts Mode Option List Use the following syntax for !shortcut mode commands: !s[hortcut] [mode_option] command First type the !s command (with the rest of word optional), followed by the mode option, if desired. Then, type the command you wish to perform. Mode Option In !shortcuts mode, the only mode option available is /w. /w [0fcnso] Sets the wait on error option. When you use this option, the operation will pause at a situation that you specify and wait for you to select a continue, retry, or cancel option. You can choose to wait at one or more of the following: 0 (zero) no wait f file sharing error c critical error n non-critical error s split/full tape o completion of operation If you do not include the /w option, the parameter file will default to the wait option currently set in the Backup Set Parameters or Restore Parameters window, depending on the short-cuts command you select. Short-cut Commands These commands are equivalent to the choices available in EzTape's Short-cuts menu. You must include a command, or the parameter file will not execute. You may have only one command in the parameter file. Here is a list of valid short-cut commands: /b Backs up all files on a drive. When you run the parameter file, you will see a window asking which drive you want to back up. Choose a drive and you will see the Backup Set Parameters window. /c Backs up only the files that have changed since last backup on a drive. When you run the parameter file, you will see a window asking which drive you want to back up. Choose a drive and you will see the Backup Set Parameters window. /r Restores all files on the current tape. When you run the parameter file, you will see the Restore Parameters window. ================================================================== Initialization Mode Use the following syntax for !init mode commands: !i[nit] [mode_option] /i First type the !i command (with the rest of word optional), followed by the mode option, if desired. Then, type /i to perform initialization. Mode Option In !init mode, the only mode option available is /w. /w [0cno] Sets the wait on error option. When you use this option, the operation will pause at a situation that you specify and wait for you to select a continue, retry, or cancel option. You can choose to wait at one or more of the following: 0 (zero) no wait c critical error n non-critical error o completion of operation Initialize Command Use the /i command to initialize a tape. This command will only be carried out if the tape needs to be initialized. You must include the /i command, or the parameter file will not execute. Example: !i /w c /i ================================================================== Utility Mode Use the following syntax for !util mode commands: !u[til] [mode_option] command First type the !u command (with the rest of word optional), followed by the mode option, if desired. Then, type the command you wish to perform. Mode Option In !util mode, the only mode option available is /w. /w [0cno] Sets the wait on error option. When you use this option, the operation will pause at a situation that you specify and wait for you to select a continue, retry, or cancel option. You can choose to wait at one or more of the following: 0 (zero) no wait c critical error n non-critical error o completion of operation Utilities Commands The commands are equivalent to the choices available in the Utilities menu. You must include a command, or the parameter file will not execute. You may have only one command in the parameter file. Listed below are the valid commands for !util mode: /n tape_name Names the tape. Example: !u /n "Drive C weekly backup" /r Performs a retension tape command to align a tape. Example: !u /r /u Sets the tape to unused. Make sure that you do not need any of the backup sets currently on the tape. Example: !u /u