HPlogo STORE and TurboSTORE/iX Products Manual: 900 Series HP 3000 Computer Systems > Chapter 11 Restoring Files

RESTORE Command Options

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

The following sections describe the RESTORE options. The options are:

  • SHOW

  • ONERR

  • CREATE

  • CREATOR

  • GID

  • KEEP, NOKEEP

  • OLDDATE, NEWDATE

  • DIRECTORY

  • LISTDIR

  • PROGRESS

  • FCRANGE

  • FILES

  • DEV

  • VOL, VOLCLASS, VOLSET

  • COPYACD, NOACD

  • TREE, NOTREE

  • PARTIALDB

  • STOREDIRECTORY

  • RESTORESET

  • MOSET

  • NAME

For descriptions of MOSET and NAME, see the "Restoring Files from Magneto-Optical Disk (MOSET and NAME)" section earlier in this chapter. For a description of RESTORESET, see the "Restoring from Multiple Devices (RESTORESET)" section earlier in this chapter.

Listing Restored Files (SHOW)

Whenever you RESTORE a set of files, the system displays the total number of files restored at your terminal. If there was an error, it also displays the names of files not restored, the reason each was not restored, and the total number of files not restored . Use the SHOW option to display the names and additional information about the files restored and to list them on your system printer as well as at your terminal.

The output listings are in the same format as STORE, which are described in Chapter 6, "STORE and TurboSTORE Command Options." Refer to that chapter for information on the possible SHOW suboptions, as well as the format and fields in the listings.

Two differences between STORE and RESTORE listing do exist, however:

  • The filenames displayed in a RESTORE listing are those of the final destination filename, which may not be the same name the file has on the tape. Restore options such as GROUP, ACCOUNT, and LOCAL may affect what filename is printed.

  • For the LONG listing, RESTORE has an extra field, called OLDSP. This field will contain the old spoolfile name for any spool files that are being restored. Since a spoolfile is given a new name when it is restored, this field will help you to associate new spoolfiles with their previous names.

Selecting a RESTORE Error Recovery Method (ONERROR)

As RESTORE restores files from tape, it displays the number of files restored and not restored, and the names of files not restored, if any. The RESTORE message also explains why each file was not restored. Such errors do not necessarily abort the RESTORE process. When RESTORE encounters an error, it either automatically recovers or terminates, depending upon the nature of the error and the error recovery method you choose.

The following errors always cause RESTORE to abort:

  • A command syntax error.

  • A disk input or output error (in the system).

  • A file directory error.

  • An error opening the tape file or an indirect file. Refer to "Using Indirect Files," in Chapter 5, "Storing Files.")

  • An incorrectly formatted STORE tape.

  • No continuation reel. You did not find a continuation reel for a multi-reel tape set.

  • A device reference error. Either the specification for the device parameter is illegal, or the device is not available.

The ONERROR option of the RESTORE command lets you choose an error recovery procedure. Your options are ONERROR=QUIT, ONERROR=SKIP, or ONERROR=FULL. QUIT is the default. You do not have to specify the ONERROR option if you want the default behavior.

If you specify SKIP, RESTORE skips the file in which the error occurred and continues restoring files from the tape. If you do not specify the ONERR option, or specify ONERR=QUIT, RESTORE terminates upon encountering a tape error.

You must have Privileged Mode capabilities to specify ONERROR=FULL. This option tells RESTORE to recover as much of a file as possible if a media error is encountered when reading the file. The file is restored, if possible to the system. However, parts of the file may be missing. These missing parts are filled with the default fill character for the file.

For each missing piece of file data, RESTORE prints a warning message to the listing file. Also, a warning message is issued for the file, stating that is was "partially restored."

In the final count of files restored at the end of the restore operation, you get a total count of the number of files, HFS directories, and symbolic links that were partially restored. You should look carefully through your RESTORE listing when you use ONERROR=FULL, to make sure that you know which files were partially restored. These files may be corrupted, and should be inspected carefully before use. Non-flat files, such as message files or KSAM files, are particularly likely to have experienced damage.

NOTE: This option is provided only for use in the event that a media read error is preventing you from recovering an important file that can not be recovered from any other backup or data source. This option should NOT be used on a regular basis for RESTORE. It should only be used after a normal RESTORE failed to recover a file or files due to a media read error.

Restoring Files to the Correct Group, Account, and Creator (CREATE)

Files on STORE tapes belong to the same group, account, and creator that they belonged to on disk. You RESTORE files to their original group, account, or creator, or if you have the correct capabilities, you can use RESTORE command options to copy a file to your own group and account or to copy a file to a different group, account, or creator.

Creating Groups, Accounts, and Creators

If a file's account, group, or creator has been deleted from your system after storing the file to tape, you can recreate it as you RESTORE the file from tape using the CREATE option. RESTORE sets account, group, and user capabilities to their default values when it creates them. You must have the necessary capabilities to create a new group or account. That is, you must have system manager (SM) or system supervisor (OP) capability to create a new account. You must have system manger (SM), system supervisor (OP), or account manager (AM) capability to create a new group.

For example, you stored all files in the account FEBRECS to tape on the first of March and then purged the account, its users, and its groups from the system. Several months later, a user asks you to RESTORE the files in the FEBRECS account. Using the CREATE option, you can recreate the account, groups, and creators as you RESTORE the files. For example:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.FEBRECS;CREATE=GROUP,ACCOUNT,CREATOR

Or alternatively, you could enter:

   :RESTORE;;CREATE

which will by default RESTORE all files and create all missing structures.

CAUTION: Using this method, the CREATE option creates groups, accounts, and users with default capabilities and access rights (those that exist for the group, account, and user to which you are restoring, not those that exist on the tape).

Restoring Files to Your Group and Account

Regardless of the group, account, or creator from which files were stored, you can RESTORE files into your own group and account if you have read access to the files on the tape, or system manager (SM), system supervisor (OP), or account manager (AM) capability.

"Read access" implies that if the files were restored to the groups and accounts from which they came, and those groups and accounts had default access capabilities, you would able to read the files on disk, such as with FCOPY.

Use the LOCAL option. For example, enter:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;LOCAL

The files are restored to your logon group and account with your logon user name as the creator.

Restoring a File to a Different Group, Account, or Creator

Similarly, use the GROUP and ACCOUNT options to switch a file's group and account as you RESTORE it from backup. You can use either option alone, or use both together, but you cannot use either GROUP or ACCOUNT with LOCAL. You must have system manager (SM) or system supervisor (OP) capability to switch a file's account. You must have system manager (SM), system supervisor (OP), or account manager (AM) capability to switch a file's group.

NOTE: A user without the capabilities described above can RESTORE a file to a different account or group if the following conditions are met:
  • The group, account, and file level access are available to the user.

  • The file has no lockword, or if it does, the user knows the lockword.

  • The file is not privileged.

The commands displayed below RESTORE the files that belong to the PUB group of the SMITH account on tape to the PUB group of the JONES account on disk.

   :FILE T;DEV=TAPE

   :RESTORE *T;@.PUB.SMITH;GROUP=PUB;ACCOUNT=JONES

The CREATOR option lets you change a file's creator as you RESTORE the file from tape. For example, the following command restores the files in the PUB group of the SMITH account on tape to the PUB group of the JONES account on the system disk, changing the creator to MARTY:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.PUB.SMITH;GROUP=PUB;ACCOUNT=JONES;CREATOR=MARTY

You must name a user that exists in the account as the new creator, or specify CREATE to cause the user to be created in the directory. If RESTORE does not find the user name, it does not RESTORE the file. If you use the CREATOR option without specifying a user name, RESTORE restores the file only if the tape file's creator exists in the file system directory.

NOTE: The CREATOR option cannot be used when the LOCAL option is used.

Changing a File's GID (GID)

If you need to change a file's group ID, or GID, you may specify the GID option. The GID option takes an optional file group name, for example:

   ;GID=MANAGER

If the file group name is specified, all files being restored will have their GID changed to the specified GID. If the file group name is not specified, the GID present on the backup will be preserved. This overrides any change in GID that may occur due to the LOCAL or ACCOUNT options.

Overwriting or Retaining Disk Files (KEEP, NOKEEP)

By default, RESTORE replaces disk files with the same fully qualified filename as the file you are restoring from backup. Therefore, especially if you are restoring a large number of files, to be sure that you do not overwrite an important file or files, use the KEEP parameter of RESTORE.

For example, your STORE tape might contain several files, some of which have names that are the same as files on disk. To RESTORE only those backup files with names that do not duplicate disk file names, use the following commands:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;KEEP

Using KEEP in the command above tells the system not to replace the files already on disk with files that have identical names on tape. You successfully RESTORE to disk all files on the backup that do not have the same names as files already on disk. You do not overwrite existing files on the disk.

To explicitly require RESTORE to overwrite disk files with the same fully qualified filenames, use the NOKEEP option in your RESTORE command. For example:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;NOKEEP

Specifying Modification and Last Access Date (OLDDATE, NEWDATE)

When you RESTORE a file or files, you can choose either to retain the creation, modification, access, and state change dates and times stored with the file on the backup, or you can choose to change the file's dates and times to the date you restored the file.

To retain the creation, modification, access, and state change dates and times in the file label on the backup, use the OLDDATE option of RESTORE. For example:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;OLDDATE

To change the dates and times to the date you restored the files, use the NEWDATE option. For example:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;NEWDATE

You will probably want to use NEWDATE when you RESTORE archived files, so that you do not quickly archive them again.

Restoring Directory Information (DIRECTORY)

Use the DIRECTORY parameter to restore directory information from backup. To do this, you must have system supervisor (OP) or system manager (SM) capability. All system and volume set directories located are restored. For example, to RESTORE all files and all directories from a backup, enter:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;DIRECTORY

If you use the LOCAL, ACCOUNT, GROUP, CREATOR, or CREATE parameter with DIRECTORY, RESTORE does not create or change accounts, groups, or users for files that belong to directories on tape. The LOCAL, ACCOUNT, GROUP, CREATOR, and CREATE parameters will create accounting structures only for the files that do not belong to the directories you restore.

All HFS directories, and directories from any other volume sets that were stored, are also restored when DIRECTORY is specified.

Finding Out What Is on Your Tape (LISTDIR)

Use the LISTDIR parameter of the RESTORE command to display information from the tape directory and tape label without restoring any files. The tape creation type, record size, and any files that match your fileset list display. LISTDIR may not be specified with any other parameter except DIRECTORY, MOSET, TREE, NOTREE, and NAME.

NOTE: The LISTDIR parameter works only using native mode STORE tapes and not with tapes created for MPE V/E using the automatic TRANSPORT mode of the STORE command.

The following example shows a sample RESTORE command and output display format using the LISTDIR parameter:

Figure 11-1 Sample RESTORE Command and Output

:RESTORE *T;@.PUB.SYS;LISTDIR;SHOW



          TURBO-STORE/RESTORE  VERSION  C.55.05  B5152AA  

	             (C) 1986 HEWLETT-PACKARD CO.

 WED, JUN 26, 1996,  5:07 PM





 MPE/iX MEDIA DIRECTORY



 MEDIA NAME        : STORE/RESTORE-HP/3000.MPEXL

 MEDIA VERSION     : MPE/iX 08.50 FIXED ASCII

 MEDIA NUMBER      : 1



 MEDIA CREATION DATE

 WED, JUN 26, 1996,  4:46 PM



 STORE  w@.pub.sys;*t;show



 MEDIA CREATED WITH THE FOLLOWING OPTIONS



 MEDIA RECORD SIZE : 32768

 INTERLEAVE DEPTH  : 1



 FILENAME GROUP    ACCOUNT  CREATOR               MEDIA    SET

 WAIT    .PUB     .SYS      MANAGER .SYS      >=      1

 WC      .PUB     .SYS      MANAGER .SYS      >=      1

 WELCOME .PUB     .SYS      MANAGER .SYS      >=      1

 WHAT    .PUB     .SYS      MANAGER .SYS      >=      1

 WILL    .PUB     .SYS      MANAGER .SYS      >=      1

 WMLOG   .PUB     .SYS      MANAGER .SYS      >=      1

 WORDTEXC.PUB     .SYS      MANAGER .SYS      >=      1

 WORDTEXT.PUB     .SYS      MANAGER .SYS      >=      1

If any HFS syntax files exist on the media being examined, the resulting listing will show the filenames in HFS syntax. The names will be displayed at the end of the line, similar to the HFS format for the SHOW option.

Displaying Progress Messages (PROGRESS)

Use the PROGRESS parameter to display RESTORE command progress messages at regular intervals. For example, to display progress messages every five minutes, use the following command:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;*T;PROGRESS=5

If you use the PROGRESS option alone, without specifying an interval, RESTORE displays status messages every minute.

If RESTORE is being run from a MPE session, the progress messages will be send to the standard list ($STDLIST). Otherwise, the messages will go to the system console.

Restoring Files with Certain File Codes (FCRANGE)

Use the FCRANGE parameter to restore only files with certain file codes. MPE/iX file codes distinguish different types of files. You can select up to eight file code ranges to restore. For example, files with codes 1100, 1101, and 1102 are HPWORD files. Files with codes 1152 and 1153 are SLATE files. To restore all HPWORD and SLATE files from a backup, enter:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;FCRANGE=1100/1102,1152/1153
NOTE: The FCRANGE parameter is not valid when restoring from TRANSPORT tapes.

Specifying a Maximum Number of Files to Restore (FILES)

By default, MPE/iX restores a maximum of 4000 files at a time. If you are restoring more than 4000 files using the automatic TRANSPORT mode, use the FILES= parameter to specify the maximum number of files to be restored. If you do not use the TRANSPORT mode, the FILES= parameter is not necessary. If the FILES= parameter is present with the TRANSPORT mode, it is ignored. For example, to set the maximum number of files restored to 6000 from a TRANSPORT tape, you might enter the following:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.OPERATOR.SYS;FILES=6000

Restoring Files to a Specific Device (DEV)

Use the DEV parameter to specify the device where you want to RESTORE files. Use an LDEV number or a device class to indicate the device. For example, the following command restores the file FILE1 to the disk with logical device number 2.

   :FILE T;DEV=TAPE

   :RESTORE *T;FILE1.OPERATOR.SYS;DEV=2

If you name a device class, RESTORE allocates the files to any of the home volume set's volumes within that class. If you name a specific logical device, RESTORE restores the file to that device only if the device is a system disk.

If you do not specify a device with the DEV parameter, RESTORE tries to RESTORE a file to the logical device compatible with the device type and subtype specified in the file's label and the device type and subtype of the mounted home volume set. If it cannot find such a device, RESTORE tries to RESTORE the file to a device with the device class specified in the file's label and the home volume set. If it cannot find a device with the appropriate device class, RESTORE tries to RESTORE the file to any member of the home volume set; if it cannot, it does not RESTORE the file.

You cannot use DEV with VOLSET, VOLCLASS, or VOL. See the following section.

Restoring Files to Specific Volumes (VOL, VOLCLASS, VOLSET)

Use the VOL, VOLCLASS, and VOLSET parameters to RESTORE files to a particular volume, volume class, or volume set.

Use the VOLSET parameter to reference a particular volume set. If there is no room in the volume set, RESTORE does not RESTORE the file. For example:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;VOLSET=PRIVATE_VOL_A

Use VOLCLASS to reference a particular volume class. If there is no room in the volume class you indicate, RESTORE restores the files to a volume within the volume set. If there is no room in the volume set, RESTORE does not RESTORE the files. For example, to RESTORE files to the volume class CLASS_B within the PRIVATE_VOL_A volume set, enter:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;VOLSET=PRIVATE_VOL_A;VOLCLASS=CLASS_B

Use VOL to reference a particular volume. If you do not indicate a volume class or volume set, the volume you indicate must be part of the system volume set. If there is no room on the volume you name, RESTORE restores the file to another volume within the volume class. If there is no room within the volume class, RESTORE restores the file to a volume within the volume set. As an example, to restore files to the volume named VOL_C within the PRIVATE_VOL_A volume set, enter:

   :FILE T;DEV=TAPE

   :RESTORE *T;@.@.@;VOLSET=PRIVATE_VOL_A;VOL=VOL_C

You cannot use VOL, VOLCLASS, or VOLSET together with the DEV parameter (see previous section). If a file's group and account do not exist on the volume specified with VOLSET, the file is restored to the volume set where its group and account do exist. Refer to Volume Management Reference Manual (32650-90045) for more information on using volumes, volume classes, and volume sets.

NOTE: The VOL, VOLCLASS, and VOLSET parameters are not valid for restoring from TRANSPORT tapes.

Modifying ACDs (COPYACD, NOACD)

When restoring files, the NOACD option can be used to prevent the ACDs on the backup from being restored. This will cause the files being restored to have less security than when they previously existed on the system. Using NOACD can be useful when the ACDs that exist on the backup refer to users or accounts that do not exist on the current system. Specifying COPYACD (which is the default), will cause all ACDs associated with files on the backup to be restored to the system.

Specifying HFS Files (TREE, NOTREE)

By default, RESTORE uses the last character of an HFS filename to determine if the specified file or fileset should be scanned recursively to include all files below the specified wildcards or directories. If a filename ends in a slash (/), then it will be scanned recursively to include all files below it in the hierarchical directory. Otherwise, the file or fileset is not scanned recursively, resulting in a horizontal cut at its level in the hierarchical directory. Using TREE and NOTREE can override that default behavior.

If TREE is specified, ALL files and filesets are scanned recursively, regardless of their ending character. If NOTREE is specified, then NO files or filesets are recursively scanned, resulting in a horizontal cut in the directory structure.

Restoring Part of a Database (PARTIALDB)

By default, RESTORE does not allow you to restore only part of a TurboIMAGE or ALLBASE/SQL database. The root file or DBE file and all dataset files must be specified, either by specifying just the root or DBE file, or by specifying a wildcard that includes all files in a database. However, if you need to restore only certain files from a database, then you can specify the PARTIALDB option to override the default behavior.

WARNING! Database corruption may result if not all database files are stored and restored. Be sure that you only want to store certain database files before overriding the default behavior with the PARTIALDB option.

Refer to the "Storing Database Files Using PARTIALDB or FULLDB" section in Chapter 6 for more information on using the PARTIALDB option.

NOTE: Quiescing an ALLBASE/SQL database and storing the ALLBASE/SQL database by TurboSTORE/iX 7x24 True-Online Backup when the DBEnvironment is in normal use, has the same effect as using the STOREONLINE command of SQLUtil. For a 7x24 true-online backup of ALLBASE/SQL to be of use for rollforward recovery, use the same procedures you would use when doing the STOREONLINE commands. (Refer to Chapter 7, "TurboSTORE/iX 7x24 True-Online Backup," for more information on quiescing.)

Restoring using a disk directory file (STOREDIRECTORY)

The STOREDIRECTORY option can be used to specify which store disk directory file to be used when restoring files from a backup. The backup must have been created using the STOREDIRECTORY option. See Chapter 6 for more information on creating backups with the STOREDIRECTORY option.

If this option is not specified, then RESTORE will look in the default location for a disk directory file for this backup. The default file that it will look for is:

   /SYS/HPSTORE/store_dirs/store_yyymmdd_hhmmsstt_pin##_day

The date, time, and pin number used to create this name are read from the store label of the media mounted for a backup. If the disk directory file exists on the system, RESTORE will read the media directory information from that file instead of from the backup media. RESTORE will then skip the media directory on the backup media and begin to restore files.

When restoring backups created with a 7x24 true-online backup sync point at the end of the backup, it is particularly important that a disk directory file exist on the system where the files are being restored. When restoring sync-at-end backups, RESTORE needs to know which files need to have after image log data applied to them, before it restores any files. This information is stored in the disk directory file and in a media directory located near the end of the backup media.

It is much faster and more convenient for you to read the after image log information from the disk directory file. Otherwise, RESTORE needs to have you mount the backup media that contains the "final" media directory before it can restore any files.

If a disk directory file for the backup exists, but it is not located in the default location, the STOREDIRECTORY (or STOREDIR) option can be specified to tell RESTORE where the disk directory file is located. The filename must be specified, and can be in MPE or HFS format. If it is not fully qualified, it will be qualified with the CWD.

For example, to tell RESTORE to use the file MYDIR as the disk directory file, issue the command:

   :RESTORE *T;@.@.@;SHOW;STOREDIR=MYDIR



   or



   :RESTORE *T;@.@.@;SHOW;STOREDIR=/SYS/HPSTORE/MYDIR


If RESTORE cannot open the specified disk directory file, or it cannot open the disk directory file in the default location, it will use the STORE directory from the backup media. No warning message will be displayed if RESTORE cannot locate a disk directory file.

If the STOREDIRECTORY option is used with the LISTDIR option, RESTORE can display a list of all files in the specified backup without requiring that the backup media be mounted or present on the system. This allows you to determine what files are in a backup, even if the backup media is not available. If the STORE disk directory file is located in the default location, then the full pathname of that file needs to be specified with the STOREDIRECTORY option in order to get a listing of all files in that backup.

For example, to see what files were in the 5/12/95 backup:

   :RESTORE *T;@.@.@;LISTDIR;&

    STOREDIR=/SYS/HPSTORE/STORE_DIRS/store_19950512_22002025_pin20_fri


If you keep your disk directory files in a different location, then the alternate name can be specified. A filename which is a symbolic link to the default location can also be specified:

   :RESTORE *T;@.@.@;LISTDIR;STOREDIR=LASTFULL.HPSTORE.SYS
Feedback to webmaster