HPlogo KSAM/3000 Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 USING KSAM UTILITIES

RESTORE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

Restores KSAM file from magnetic tape or serial disc.

 

   :RESTORE restorefile ;filereference1,filereference2[, . . .] [;KEEP] 

         [;DEV=device] [;SHOW] [;FILES=maxfiles] 

Restores to disc, one or more files stored off-line to magnetic tape or serial disc by the :STORE command. To restore a KSAM file, both the data file and the key file names must be specified.

PARAMETERS

restorefile

Name of magnetic tape or serial disc file on which files to be retrieved now reside. This file must be referenced in the backence (*) format; this format references a previous :FILE command that defines the file as a magnetic tape or serial disc file. A message is output to the Console Operator requesting him to mount the magnetic tape or serial disc platter identified by the filereference parameter in the :FILE command, and allocate the tape unit or disc platter to you.

(Required parameter.)

filereference1

Acual file designator identifying the KSAM data file, specified in the format:

 

   filename [/lockword] [.groupname [.accountname] ] 

where each subparameter is a name consisting of from 1 to 8 alphanumeric characters beginning with a letter.

(Required for KSAM files.)

filereference2

Actual file designator identifying the KSAM key file, specified in the same format as filereference1.

(Required for KSAM files.)

KEEP

Specification that if a file referenced in the :RESTORE command currently exists on disc, the file on disc is kept and the corresponding file on tape or serial disc is not copied into the system. If KEEP is omitted, and an identically-named file exists in the system, that file is replaced with the one on the tape or serial disc. If KEEP is omitted, and a file on tape or serial disc is eligible for restoring and a file of the same name exists on disc, and this disc file is busy, the disc file is kept and the tape or serial disc file is not restored.

(Optional parameter.)

DEV=device

Device class name or logical number of device on which files are to be restored. (This name is also written on the label of each file restored.) If you omit this parameter, MPE attempts to replace the files on a device of the same class (or logical device number) as that of the device on which the file was created, If this attempt fails, perhaps because the device class specified does not exist or the tape or serial disc was created on a previous version of this computer, MPE attempts to replace each file on a disc of the same type (fixed or moving -head) and subtype as that on which it was created. If this fails, MPE attempts to restore the file to a device of class name DISC. If this fails, the file is not restored. If the KSAM file was created with the data file and the key file on different devices, then RESTORE twice using different DEV=device in each RESTORE.

(Optional parameter.)

SHOW

Request to list names of restored files. If you omit SHOW, only total number of files restored, list of files not restored (and the reason each was not restored), and count of files not restored, are listed.

(Optional parameter.)

FILES= maxfiles

Maximum number of files that may be restored. If omitted, 4000 is assigned by default.

(Optional parameter.)

USING THE :RESTORE COMMAND

Before issuing a :RESTORE command you must identify tapefile as a magnetic tape or serial disc file with the :FILE command:

 

   :FILE formaldesignator [=filereference] ;DEV=device 

The device parameter must indicate the device class name or logical unit number of a magnetic tape or a serial disc unit. No other parameters than these may be supplied. If you attempt to supply more, the :RESTORE command is rejected.

To retrieve from the magnetic tape file SAVEFILE, the KSAM file KSAMDATA that includes data file (KSAMDATA) and key file (KSAMKEY):

 

   :FILE T=SAVEFILE;DEV=TAPE 

   :RESTORE *T;KSAMDATA,KSAMKEY;KEEP;DEV=DISC;SHOW 

To retrieve this same file from the serial disc STORDISC, enter the commands:

 

   :FILE SD=STORDISC; DEV=SDISC 

   :RESTORE*SD;KSAMDATA,KSAMKEY;KEEP;DEV=DISC;SHOW 

Note that both the data file and the key file must be specified in order to restore the entire KSAMI file.

If the KSAM file currently saved on magnetic tape or serial disc was originally created with the data file resident on one device and the key file resident on a different device, then this capability can be retained only if you RESTORE twice using different DEV= specifications in each command.

For example:

 

   :FILE T:DEV=TAPE 

   :RESTORE *T;KSAMDATA;DEV=DISCONE 

   :RESTORE *T;KSAMKEY;DEV=DISCTWO

Upon successful completion, KSAMDATA will be restored from tape file T to a device class identified as DISCONE, and KSAMKEY will be restored from tape file T to a device class identified as DISCTWO. You would do this only in the case where the file was originaly created using the BUILD command specification DEV=DISCONE for the data file, and KEYDEV=DISCTWO for the key file.

Feedback to webmaster