sel-restore command

The sel-restore command selectively restores items from either a file-save, account-save, incremental save, or transaction log media to a specific file.


 sel-restore destination.file{item.list*} {(options)}
 Account name on tape:?
 File Name:? tape.file


destination.file File to restore into. The file must already exist.
tape.file Name of the file on the offline media. The system prompts for the file name of the file to restore from the save media. If a null file reference is entered, the account’s master dictionary is restored.
item.list* Designates which items to restore from tape. A null list restores all items.
options a Indicates that the media is already positioned at the correct account.

The a option is used to avoid rewinding and searching. If the order of the file on the tape is known (from the list-file-stats report generated following the save), then multiple files can be restored without rewinding the media.

After the first file is restored on the account, the next sel-restore is done using the a option. The sel-restore process prompts directly for the file reference. The system next prompts for full, incremental, or transaction restore. As the tape is searched, the file names on it are printed, along with the file numbers. Names are indented one space for account names, indented two spaces for dictionaries, and indented three spaces for data file names. At the completion of the restore, the system again prompts for incremental and transaction restore.

c Causes every item in the current file to be a candidate for restore. This ensures that data can be restored even if a D-pointer is damaged on the tape. T

his option is used with the n option.

f Displays all file references for all accounts.

This is not compatible with the n option.


Prompts the user for a group number that must match for an item to be restored.

Items that have been saved (for example, account-save) have a saved associated group number. This saved associated group number is checked to determine if a match has occurred.

i Indicates that Item-IDs of the restored items are not to be printed.
n Restores a file by its number.

The process prompts for the number of the file to restore. This option is particularly useful for restoring from a multi-reel backup media, so that the restore can begin from the reel where the file resides (or begins). The file number can be found on the file statistics report for the appropriate save media.

o Overwrites if a duplicate item-ID is found on disk.

D-pointers are protected from being replaced by duplicate item-IDs.

s Suppresses the message ’item-ID’ exists on file.
z Bypasses prompts for restore only.

Normal backup procedures ensure all the items in all the files are saved from time to time. Critical files can be backed up continuously using the transaction logger.

The media used for this backup can be SCT, half-inch tape, floppy disks, and so on. For convenience, the save media is referred to as tape, or media.

This command can be invoked after the physical save media is put in the appropriate I/O device and attached with the appropriate command.

The specified account name and file reference variables must match exactly with the appropriate name on tape.

To check the contents of the tape, the files can be listed by using a sel-restore and specifying a dummy account name and file reference on the tape. A dummy account/file name is one that does not exist in the system. For example, oxymoron. The entire tape is searched looking for the dummy account, printing the names of the files on the tape.

In restoring both the dictionary and data section of a file, restore the data section first. Although the dictionary name appears before the data section name on the screen, the data is saved (and restored) before the dictionary.

At any point, the media can be moved backward (using the t-bck (n) command), or forward (using the t-fwd (n) command) to position it. This is assuming that the save media device supports the command. Also, a sel-restore command with the a or n option can be started. This might be faster than restarting the tape from the beginning when restoring both the dictionary and the data sections of a file, or when restoring multiple files. However, SCTs do not allow t-bck. The only recourse is rewinding (t-rew) and moving forward to the correct file (t-fwd).

Account dictionaries (master dictionary items) follow all other files for each master dictionary on the tape.

If the s option is specified when the save tape is created, the contents of the tape can be seen using list-file-stats anytime before another file save using the s option.

Note: The term tape is used for a documentation convention only.

The type of media is determined prior to using this command by the use of either the set-floppy, set-sct, or other media-attaching commands. After the media is attached, all of the typical tape-handling commands can be used, with a few exceptions such as t-reten and t-erase.


Example 1

 sel-restore dict devices
 Restore from (F)ull account, (I)ncremental, (T)ransaction log: _ f
 Account name on tape: dm
 File name: dict devices
      Scans the file-save tape, and finds the ’dm’ account
      Scans the DM account and finds the ’dict devices’ file
      Scans the DEVICES file and restores the requested item(s)
 Restore from Incremental save tape? _ no
 Restore from transaction log? _ no

Example 2

This example shows the sel-restore command using the g option:

 :sel-restore file3 (g
 Restore from F)ull/Account, I)ncremental or T)ransaction log (f/i/t):f
 account name on tape:gg
 file name:file1
 gg 294
 file1 297
 file1 298
 1 78
 2 27
 Restore from incremental save tape (y/n)? n
 Restore from transaction log tape (y/n)? n
 [992] 2 item(s) have been restored