HP 3000 Manuals

Specifying a Destination for the Restored Files [ Performing System Operation Tasks ] MPE/iX 5.0 Documentation


Performing System Operation Tasks

Specifying a Destination for the Restored Files 

When you restore files from tape to disk, 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.

Rather than letting MPE/iX determine the location of the restored files,
you can determine where the files are copied.  This can include
specifying:

   *   the volume set for the restored files

   *   the device for the restored files

   *   the group, account and creator for the restored files

The following sections teach you how to specify the destination of the
files you are restoring.

To restore files to a specific volume set 

Use the VOL, VOLCLASS, and VOLSET parameters of the RESTORE command to
restore files to a particular volume, volume class, or volume set.  When
using these parameters, note the following exceptions:

   *   You cannot use VOL, VOLCLASS, or VOLSET together with the DEV
       parameter.

   *   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.

   *   The VOL, VOLCLASS, and VOLSET parameters are not valid for
       restoring files from transport tapes.

Use the VOLSET parameter to reference a particular volume set.  For
example, to restore all the files on the STORE tape to PRIVATE_VOL_A,
enter:

     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 

Refer to Volume Management Reference Manual (32650-90045) for more
information on using volumes, volume classes, and volume sets.

To restore files to a specific device 

Use the DEV parameter of the RESTORE command to specify the device to
which you want to restore files.  You can reference a device either by
its LDEV number or its device class.  Keep in mind, however, that
specifying the logical device number is more specific since more than one
disk can belong to the same device class.  Note that you cannot use the
DEV parameter with VOLSET, VOLCLASS, or VOL parameters.

For example, to restore FILE1 in the group OPERATOR of the SYS account to
LDEV 2, you enter:

     FILE T;DEV=TAPE 
     RESTORE *T;FILE1.OPERATOR.SYS;DEV=2 

Or, to restore all of the files in the accounting directory and any files
and directories below it to LDEV 2, enter:

     FILE T;DEV=TAPE 
     RESTORE *T;/accounting/;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.

You cannot use the DEV parameter of the RESTORE command with VOLSET,
VOLCLASS, or VOL parameters.

To restore files to their original group, account, and creator 

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.  If a file's
account, group, or creator have been deleted from your system after
storing the file to tape, you can recreate it as you restore the file
from tape with the CREATE parameter.  You must have system manager (SM)
or system supervisor (OP) capability to create a new account, and system
manager (SM), system supervisor (OP), or account manager (AM) capability
to create a new group.


NOTE The RESTORE command sets account, group, and user capabilities to their default values when it creates them, which may not be the same capabilities they had on the source system.
For example, suppose 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 t he system. Several months later, a user asks you to restore the files in the FEBRECS account. Using the CREATE parameter, 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 The default restores all files and creates all missing structures. To restore 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 if you have system manager (SM), system supervisor (OP), or account manager (AM) capability. ("Read access" above 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 be able to read the files on disk, such as with FCOPY.) To use the LOCAL parameter to restore all the files on the STORE tape to your own group and account, enter: FILE T;DEV=TAPE RESTORE *T;/;LOCAL The files will be restored to your logon group and account with your logon user name as the creator. To restore a file to a different group, account, or creator You can use the GROUP, ACCOUNT and CREATOR parameters to change a file's group, account, or creator as you restore it from tape. You can use any of the parameters alone or in combination, but you cannot use them with the LOCAL parameter. You must have system manager (SM) or system supervisor (OP) capability to change a file's account. You must have system manager (SM), system supervisor (OP), or account manager (AM) capability to change a file's group. A user with fewer capabilities than described above can restore a file to a different account, group or creator if the following conditions are met: * The group, account, and file-level access is available to the user. * The file has no lockword, or if it does, the user knows the lockword. * The file is not privileged. For example, to 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, enter: FILE T;DEV=TAPE RESTORE *T;@.PUB.SMITH;GROUP=PUB;ACCOUNT=JONES Or, for example, to restore 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 have MPE/iX create the user in the directory. If RESTORE does not find the user name, it does not restore the file. If you use the CREATOR parameter without specifying an existing user name, RESTORE restores the file only if the tape file's creator exists in the file system directory. To restore the hierarchical directory structure You use the DIRECTORY parameter to place the directory structure on tape when you intend to use the tape to reload the system. MPE/iX regenerates the entire hierarchical directory structure before it restores any files. It also restores the system accounting directories for any volume sets saved on the tape. If the STORE tape is missing a directory needed to restore a file, one of two things can happen: * If you use the CREATE option with the RESTORE command, all directories matching the specified file set are restored. If the STORE tape is missing a directory that is required to restore a file, MPE/iX creates it with default security provisions. * If you omit the CREATE option, MPE/iX prints an error message for every file that it cannot restore due to a missing directory component. As a result, it restores only those files within the directory structure stored to tape, which prevents previously deleted users, groups, directories or accounts from reappearing on the system. If you reload your system directory, and you want all of the files outside your system domain to have their corresponding groups, accounts, and creators created, enter the RESTORE command as follows: RESTORE *T;/;DIRECTORY;CREATE=GROUP,ACCOUNT,CREATOR Overwriting and Retaining Disk Files By default, RESTORE will replace any disk files that have the same fully qualified file name as the file you are restoring from tape. If you are restoring a large number of files, be sure that you do not overwrite an important file or files. Use the KEEP parameter of the RESTORE command. To retain disk files. Your STORE tape might contain several files, some of which have names that are the same as files on disk. To restore only those tape 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 those with the identical names on tape. You will successfully restore to disk all files on the tape that do not have the same names as files already on disk. To overwrite disk files. To explicitly require RESTORE to overwrite disk files that have the same fully qualified file names, use the NOKEEP parameter in your RESTORE command. For example: FILE T;DEV=TAPE RESTORE *T;/;NOKEEP Specifying Modification and Last Access Date When you restore a file or files, you can choose either to retain the modification date and last access date stored with the file on tape or to change the file's modification date and last access date to the date you restored the file. To retain the dates. To retain the modification and last access date in the file label on tape, use the OLDDATE parameter of RESTORE. Enter: FILE T;DEV=TAPE RESTORE *T;/;OLDDATE To change the dates. To change the modification and last access date to the date you restored the files, use the NEWDATE parameter. For example: FILE T;DEV=TAPE RESTORE *T;/;NEWDATE It is a good idea to use NEWDATE when you restore archived files, so that you do not archive them again in the near future. NEWDATE is the default. Listing Restored Files 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 parameter 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 appear in the same format as they do for the STORE command. Refer to Chapter 6 for information on the SHOW options, as well as the format and fields in the listings.


MPE/iX 5.0 Documentation