HP 3000 Manuals

RESTORE [ HP 3000 Series 9X8LX Computer Systems Commands Reference ] MPE/iX 5.0 Documentation


HP 3000 Series 9X8LX Computer Systems Commands Reference

RESTORE 

This command returns files, that are currently stored on magnetic tape,
back to the system.

Syntax 

RESTORE [restorefile][;filesetlist][;option[;...]]

     where option is:

[;DEV={device}] [;SHOW[=showparmlist]] [;{LOCAL GROUP=groupname}[;...]]
                                       [ {ACCOUNT=accountname  }      ]

[;{KEEP  }] [;{OLDDATE}] [;ONERROR={QUIT}] [;DIRECTORY] [;LISTDIR]
[ {NOKEEP}] [ {NEWDATE}] [         {SKIP}]

[;TREE][;NOTREE]

Parameters 

restorefile           Specifies the name of the magnetic tape file that
                      contains the files that you want to restore to the
                      system.  You must backreference the file by using
                      an asterisk (*).  First, you must use a file
                      equation before entering the RESTORE command.  For
                      instance, if you want to restore files from a file
                      called SOURCE, enter the following file equation
                      before entering the RESTORE command:

                           FILE SOURCE;DEV=TAPE 

                      A message appears on the console asking you to
                      mount the tape identified by the restorefile 
                      parameter and to allocate the device.

filesetlist           Specifies the set of files to be restored.  The
                      default is depends on the user's capability as
                      shown below:

                      Default               Capability

                      @                     None

                      @.@                   Account manager (AM)

                      @.@.@                 and/or system supervisor (OP)

                      The is parameter has the form shown below:

                           filesetitem[,filesetitem[...]]

                      where filesetitem can be ^indirectfile or fileset.

indirectfile          A file name that backreferences a disk file.  The
                      syntax is:

                      ^indirectfile 

                      This file may consist of fileset(s) and option(s),
                      but only options can appear after the first
                      semicolon (:)  on each line.  An option specified
                      on one line will operate on all files in the
                      filesetlist.

fileset               Specifies a set of files to be restored, and
                      optionally those files to be excluded from the
                      RESTORE operation.  The fileset parameter has the
                      form:

                           filestorestore[-filestoexclude[..]]

                      The system restores any file that matches
                      filestorestore unless the file also matches
                      filestoexclude, which specifies files to be
                      excluded from the restore operation.  You may
                      specify an unlimited number of filestoexclude.

                      Since "-" is a valid character for HFS syntax file
                      names, a blank character must separate it from HFS
                      file sets to obtain the special negative file set
                      meaning.

filestorestore        Both filestorestore and filestoexclude may be
filestoexclude        entered in MPE or HFS syntax.  Wildcards are
                      permitted for both MPE as well as HFS syntax,
                      however, MPE wildcards are not expanded in
                      filestoexclude.  This means that @.@.@-@.@.@ is NOT 
                      an empty fileset.  It would contain all of the HFS
                      named files on the system.

                      The MPE syntax is as follows:

                           filename[.groupname[.accountname]]

                      A lockword may be specified for files to be stored,
                      in the form:

                           filename/lockword.group.account 

                      The HFS syntax is as follows:

                           /dir_lev_1/dir_lev_2/.../dir_lev_i/.../filedesig 

                      or

                           ./dir_lev_i/dir_lev_j/.../dir_lev_k/.../filedesig 

                      If the name begins with a dot (.), then it is fully
                      qualified by replacing the dot with the current
                      working directory (CWD).

                      Each of the components dir_lev_i and filedesig can
                      have a maximum of 255 characters with the full path
                      name being restricted to 1023 characters.  Each of
                      the components dir_lev_i and filedesig can use the
                      following characters:

                             letter a to z

                             letter A to Z

                             digit 0 to 9

                             special characters - _ .

                      For HFS name syntax, the lowercase letters are
                      treated distinctly from the uppercase letters (no
                      upshifting).

                      Both MPE and HFS name components can use the
                      characters @, #, and ?  as wildcard characters.
                      These wildcard characters have the following
                      meaning:

                      @                     specifies zero or more
                                            alphanumeric characters.

                      #                     specifies one numeric
                                            character.

                      ?                     specifies one alphanumeric
                                            character.

                      These wildcard characters can be used as follows

                      n@                    Restore all files starting
                                            with the character n.

                      @n                    Restore all files ending with
                                            the character n.

                      n##...#               Restore all files starting
                                            with character n followed by
                                            up to seven digits (useful
                                            for restoring all EDIT/3000
                                            temporary files).

                      n@x                   Restore all files starting
                                            with the character n and
                                            ending with the character x.

                      ?n@                   Restore all files whose
                                            second character is n.

                      n?                    Restore all two-character
                                            files starting with the
                                            character n.

                      ?n                    Restore all two-character
                                            files ending with the
                                            character n.

                      Also, character sets may be specified in the
                      following syntax:

                      [ct]                  specifies letter c or t.

                      [c-t]                 specifies any letter from
                                            range c to t.

                      [e-g1]                specifies any letter range e
                                            to g or digit 1.

                      Examples of using character sets are:

                      [A-C]                 @ All files that begin with
                                            the letters A, B, or C.

                      myset[e-g1]           All files that begin with the
                                            name myset and end in E, F,
                                            or G, or 1.

                      myset [d-e1-6]        All files that begin with the
                                            name myset and end in D or E,
                                            or 1, 2, 3, 4, 5, or 6.

                      Up to a maximum of sixteen characters may be
                      specified for each character set and brackets are
                      not allowed to be nested.

                      A character set specifies a range for only one (1)
                      ascii character.  The range [a-d]@ gets all files
                      that begin with the letter a through the letter d.
                      The ranged [ad-de] may cause unpredictable results.

                      Since the hyphen (-) is a valid character for HFS
                      syntax file names, it is allowed inside a character
                      set, immediately following a left bracket ([) or
                      preceding a right bracket (]).  When specified
                      between two characters, the hyphen implies a range
                      of characters.

                      When a MPE name component is a single @ wildcard,
                      the@ will be folded to include all MPE and HFS
                      named files at that level and below.  To specifiy
                      only MPE-named files, use ?@ instead.

                      A fileset may be entered in any of the following
                      formats and may use wildcard characters.
                      Equivalent MPE and HFS formats are grouped together
                      as follows.

                      file.group.acct       One particular file in one
                                            particular group in one
                                            particular account.

                      file.group            One particular file in one
                                            particular group in the logon
                                            account.

                      file                  One particular file in the
                                            logon group and account.

                      @.group.acct          All files (MPE and HFS) in
                      /acct/group/          one particular group in one
                                            particular account (including
                                            the GROUP directory).

                      ?@.group.acct         All MPE name files in one
                                            particular group in one
                                            particular account.

                      @.group/log-          All the files (MPE and HFS)
                      onacct/group/         in one particular group in
                                            the logon account.

                      ?@.group              All MPE named files in one
                                            particular group in the logon
                                            account.

                      @.@.acct /acct/       All the files (MPE and HFS)
                                            in all the groups in one
                                            particular account (including
                                            the ACCT directory), plus all
                                            the files and directories
                                            under the specified account.

                      ?@.@.acct             All MPE named files in all
                                            the groups in one particular
                                            account.

                       @                    All (MPE and HFS) files in
                                            the CWD.

                      @.@                   All (MPE and HFS) files in
                                            the logon account.

                      ?@.@.@                All MPE named files in the
                                            system.

                      @.@.@                 All the files and directories
                                            (MPE and HFS) in the system.

                      thisisit.@.acct       Any MPE file named thisisit
                                            in all the groups in one
                                            particular account.

DEVICE                Specifies the device on which the file resides.  It
                      takes one of two forms, devclass or ldn:

                      devclass              Specifies the type of device.
                                            If devclass is specified, the
                                            file is allocated to the home
                                            volume set (within the
                                            specified device class) of
                                            the group into which a file
                                            is being restored.

                      ldn                   Specifies a particular
                                            logical device number ldn 
                                            corresponding to a particular
                                            device.  If ldn is specified,
                                            the file will be allocated to
                                            that device only if one of
                                            the volumes in the home
                                            volume set (of the group into
                                            which a file is being
                                            restored) currently occupies
                                            the device.

                      Default MPE/iX attempts to restore the file on a
                      logical device compatible with the type and subtype
                      specified in the file's file label and with the
                      type and subtype of the mounted home volume set (of
                      the group into which a file is being restored).  If
                      this fails, an attempt is made to restore the file
                      on the same device class as specified in the file's
                      file label and that of the mounted home volume set
                      (of the group into which a file is being restored).
                      If this fails, an attempt is made to restore the
                      file on any member of the home volume set (of the
                      group into which a file is being restored).  If
                      this fails, the file is not restored.

SHOW                  Request to list names of restored files.  Default
                      is a listing of the total number of all files
                      restored and not restored.  For files not restored,
                      the reason and the names are listed.  This listing
                      is sent to $STDLIST (formal designator SYSLIST)
                      unless a FILE command is entered to send the
                      listing to some other device.  For instance,

                           FILE SYSLIST; DEV=LP 

                      entered before the RESTORE command would send the
                      listing to a line printer.

showparmlist          Tells RESTORE what information to display for the
                      files that are restored.  If you specify ;SHOW and
                      omit showparmlist, then the default is SHORT if the
                      recordsize of SYSLIST is less than 132 characters,
                      or LONG if the recordsize is equal to or greater
                      than 132 characters.  The format for showparmlist
                      is:

                           showparm [,showparm[,showparm[,...]]]

                      where showparm may be one of the options described
                      below.  If you do not specify SHORT or LONG, then
                      the base information is SHORT if SYSLIST is less
                      than 132 characters, or LONG if SYSLIST is 132 or
                      more characters.

                      If an HFS-named file is specified in the
                      filesetlist, or the expansion of a wildcard
                      includes a HFS-named file, then a HFS-style output
                      listing will be used.  This listing shows the same
                      information as the MPE format, but puts the name of
                      the file at the right end of the listing, to allow
                      for longer HFS names.  If a HFS name is too long to
                      fit in the record size of the output file, it will
                      be wrapped onto the next line.  Wrapping is
                      signified by a "*" as the last character on the
                      line.

showparm              An option that displays information for files to be
                      restored.

                      SHORT                 Overrides a default of LONG
                                            and displays file name, group
                                            name, account name, volume
                                            restrictions, file size (in
                                            sectors), file code, and reel
                                            number.

                      LONG                  Overrides a default of SHORT
                                            and displays all the
                                            information that SHORT does
                                            and adds record size,
                                            blocking factor, maximum
                                            number of extents allowed,
                                            allocated, end- of-file, and
                                            file record limit.  For
                                            spoolfiles, the old spoolfile
                                            name is also displayed.

                      NAMESONLY             Displays only the filename
                                            and the starting and ending
                                            media number.  NAMESONLY is
                                            not allowed with SHORT or
                                            LONG.

                      DATES                 Displays the creation date,
                                            the last date of access, and
                                            the last date of
                                            modification.

                      SECURITY              Displays the file creator and
                                            the security matrix.

                      PATH                  Forces all file listings to
                                            be in HFS format.  The full
                                            HFS pathname is displayed
                                            instead of MPE style names.

                      OFFLINE               Sends an additional copy to
                                            the device OFFLINE, which
                                            defaults to device LP.

LOCAL                 Specifies that files will be restored regardless of
                      the system's directory structure.  The files will
                      be stored under the user's logon group and account.

GROUP= groupname      Specifies that the files being restored will be
                      restored to an existing group identified as
                      groupname.

ACCOUNT= accountname  Specifies that the files being restored will be
                      restored to an existing account identified as
                      accountname.  If you specify LOCAL, you cannot
                      specify groupname or accountname.

KEEP                  If a file on the RESTORE tape has the same name as
                      a file already residing on the disk, KEEP instructs
                      the system to preserve the file on the disk and to
                      skip over the file on the RESTORE tape.  The file
                      on tape is not restored and the file on the disk
                      remains as it was.

                      Default:  If you do not specify KEEP, then the file
                      on the RESTORE tape replaces the identically named
                      file on the disk.  The only exception is if the
                      file on the disk is being accessed when RESTORE
                      attempts to replace it.  In that case, RESTORE
                      preserves the file on the disk (as if you had
                      specified KEEP) and skips over the file on the
                      tape.

NOKEEP                Instructs the system to restore every file on the
                      tape, even if it has the same name as a file
                      already residing on the disk.

NEWDATE or OLDDATE    MPE/iX stores four dates in each file's file label
                      the creation date, modification date, last access
                      date, and the allocation date.  The allocation time
                      is also stored in the label.  NEWDATE changes all
                      dates and times to the date and time that RESTORE
                      was executed.  OLDDATE retains the original
                      modification and last access dates, but changes the
                      creation and allocation dates to the date of the
                      RESTORE procedure.  Default is NEWDATE.

ONERROR               Tells RESTORE what to do if there is a tape read
                      error.  If you omit this parameter, then the
                      default option is QUIT for labeled and unlabled
                      tapes.  ONERR is a synonym for ONERROR.

                      QUIT                  Tells RESTORE to abort after
                                            a tape read error.

                      SKIP                  Tells RESTORE to perform a
                                            file-skip forward past a tape
                                            error, resynchronize, and
                                            resume reading from the tape.

DIRECTORY             Instructs RESTORE to restore all the volume set
                      directories on the media.  You must have system
                      supervisor (OP) or system manager (SM) capability
                      to use this parameter.

LISTDIR               This option may not be specified with any other
                      option, other than DIRECTORY. If specified with
                      DIRECTORY, the directory is displayed.  Used by
                      itself, it displays information from the tape
                      directory and tape label, but does not restore any
                      files.  The type of tape created, the record size,
                      and any files that match your filesetlist are
                      displayed.  The security restrictions that apply to
                      filesetlist apply here, too.  The output goes to
                      SYSLIST.

TREE                  The tree option forces every HFS syntax file set to
                      be scanned recursively, irrespective of the slash
                      specified or not at the end of the file set.

NOTREE                The notree option forces every HFS syntax file set
                      not to be scanned recursively irrespective of the
                      slash specified or not at the end of the file set.
                      This option yields a horizontal cut in the
                      hierarchical directory.

Operation Notes 

   *   Usage 

       You can use this command to restore data onto system disks, from a
       file or files previously stored by the STORE command.  A message
       is shown on the system console requesting the system operator to
       mount the device(s) identified by the restorefile parameter and to
       allocate the device(s).

       No message is displayed if AUTOREPLY is configured through SYSGEN.

       If you press [Break] during a RESTORE operation, the operation
       continues while you interact with the Command Interpreter.  Both
       ABORT and RESUME can be used within BREAK.

       This command may be issued from a session, job, program, but not
       in BREAK. The user must have System Manager (SM), System
       Supervisor (OP), or Privileged Mode (PM) capability to use this
       command for privileged files.

   *   Command process 

       The output generated by RESTORE goes to a file whose formal
       designator is SYSLIST. If a disk or directory error is encountered
       while updating the directory, updating the Disc Free Space tables,
       or writing the data to the file, the error is reported to SYSLIST
       (defaults to $STDLIST) and RESTORE will continue.  Any file
       belonging to a group whose home volume set has not been mounted
       will not be restored.

       Before entering RESTORE, you must identify restorefile as a
       magnetic tape or DDS device with a FILE command.  If the user does
       not specify restorefile, then a default tape name will be used.
       The default tape name is equal to the user's logon identification
       and the device is TAPE. For example, if the user is logged on to
       TOM.MGR, then the tape request will be for TOM. No file equation
       may be used to change the default.

   *   Required capabilities for restoring files 

       Your capabilities determine which files you may restore.  If you
       have system manager or system supervisor capability, you can
       restore any file from a STORE tape, assuming the account and group
       to which the file belongs, and the user who created the file, are
       defined in the system.  If you have account manager capability,
       you can restore any file in your account.  To restore files with
       negative file codes, you need Privileged Mode (PM), system
       supervisor (OP), or System Manager (SM) capability.  If you have
       standard user capability, you can restore only those files in your
       logon account.

   *   Lockword requirements 

       The system manager and system supervisor may restore
       lockword-protected files without specifying the lockword only when
       RESTORE is executed during a session.  Users without SM or OP
       capability must always supply the lockword.  The exception is AM.
       If you have AM and you are working in your own account, you do not
       have to supply the lockword.  If RESTORE is executed as a job,
       however, all users lacking SM, OP, or AM capability must supply
       file lockwords.

       When the RUN command is used, the system-defined JCW CIERROR will
       not be changed even if the RESTORE aborts.  When invoking RESTORE
       through the Command Interpreter (for example, RESTORE *T;@), the
       system-defined JCW CIERROR will be set to the value 1091 if the
       RESTORE command aborts for any reason.  Check this value with the
       SHOWJCW command after RESTORE aborts.

   *   Disk space requirements 

       RESTORE determines whether sufficient disk space remains to
       restore a file that already exists on the disk.  If sufficient
       space remains, RESTORE writes a new copy of the file to the disk
       before purging the old copy of the file.  The old copy of the file
       is purged only if the RESTORE operation is successful.

       If sufficient space is not available, RESTORE first purges the old
       copy of the file and then writes a new copy to the disk.  If the
       RESTORE operation fails in this circumstance, you will receive a
       message on $STDLIST informing you that there is no copy of the
       file on the disk:

            ***WARNING OLD FILE HAS BEEN PURGED***

Examples 

To restore all files belonging to your logon group from the restorefile 
T, enter:

     :FILE T;DEV=TAPE 
     :RESTORE *T;@;KEEP;SHOW 

In response, the system operator receives a request to mount the tape
identified as T. If a file on T already exists in the system, it will not
be restored because the KEEP parameter was specified.

To restore a file ABC without specifying a restorefile, no file equation
need be used.  For example:

     RESTORE ;ABC.PUB.SYS;SHOW

     STORE/RESTORE, VERSION A.20.03 (C) 1986 HEWLETT-PACKARD CO.
     FRI, APR 12, 1989, 11:56 AM

     WILL RESTORE 1 FILES; NUMBER OF FILES ON TAPE = 87

     FILENAME GROUP ACCOUNT VOLUME RESTRICTIONS     SECTORS CODE   REEL
     ABC      .PUB .SYS     MPEXL_SYSTEM_VOLUME_SET    4  NMPROG 2

     FILES RESTORED: 1
     :

If you restore all files without specifying a fileset, a warning will
appear, alerting you that all files, based on your capabilities, will be
restored

     TURBO-STORE/RESTORE  VERSION  A.50.03  HP36398A
     1986 HEWLETT-PACKARD CO.
     WED, DEC 15, 1993,  7:16 PM
     WARNING: YOUR DEFAULT FILESET BECOMES '@.@.@' SINCE YOU HAVE OP
     OR SM CAPABILITY  (S/R 1911)

To have the list of restored files printed on a line printer, enter

     :FILE SYSLIST;DEV=LP 
     :FILE T;DEV=TAPE 
     :RESTORE *T;@;SHOW 

To restore only a subset of the fileset, enter

     :RESTORE *T;@.@.@-@.PUB.SYS 

(Restores all files except those in the PUB group of the SYS account.)

Related Commands 

     STORE
     VSTORE
     REPLY
     RECALL



MPE/iX 5.0 Documentation