Rather than having to issue a whole lot of command line options every time you wish to run backup/restore, it is possible to store commonly used options in a preference file. Individual users can have their own preference file in their ~ directory, or there can be a global preference file in /usr/local/etc. Both backup & restore look for a preference file in the following sequence:
Note that command line options over-ride preference file and internal default settings.
It is possible to change and save preferences within taper. Select the appropriate option from the taper menu (ie. either global options, backup options or restore options). To move between options, press the up or down arrows (or left and right). To change an option, use the left and right arrow keys. When you have finished, press F10 (to change this from F10, change the entry in defaults.h).
There are two methods of saving your preferences. One is to a preference file or, the second is to a command line file. To save to a preference file, select the appropriate option. Give the filename of the preference file (default is ~/taper_prefs) and then press F. Next time you start taper, the preferences that you have selected will be automatically loaded.
The second method of saving is to a command line file. The saves the preferences you have selected to a shell script. Select the name of the shell script (default is start_taper). To invoke taper using the selected preferences, issue a `sh start_taper'. This is useful if you have temporary (or multiple) configurations and you don't want to overwrite your existing preference file.
The format of a preference file is a text file with one preference per line. A preference is given:
PREFERENCE=VALUE
See the file 'pref_example' for an example of a preference file.
Spaces are ignored - use quotes if spaces are needed
The name of the preferences are the same as the long command line option name. For example, to change the log file to my_log_file, place the following line in your preference file:
log-file = my_log_file
The following preferences can be prefixed by a letter to indicate which tape drive they belong to.
For example, if you have the following line in your preference file,
block-size = 12300
z-block-size = 43122
z-tape-name = /dev/qft0
z-ntape-name = /dev/nqft0
s-tape-name = /dev/scsi
s-ntape-name = /dev/nscsi
-z
then the block-size is set to 43122 only if the zftape driver is selected, otherwise, it is set to 12300. Also, the device names are set to /dev/qft0 & /dev/nqft0 if the zftape driver is selected, or to /dev/scsi &/dev/nscsi if the scsi driver is selected. If the preference given is block-size=43122, then the block-size will be set to 43122 regardless of the tape driver selected.