RESTORE Command Options [ STORE and TurboSTORE/iX Manual ] MPE/iX 5.0 Documentation
STORE and TurboSTORE/iX Manual
RESTORE Command Options
The following sections descirbe the RESTORE options. The options are:
* VOL, VOLCLASS, VOLSET
* DEV
* FCRANGE
* SHOW
* LISTDIR
* FILES
* CREATE
* KEEP, NOKEEP
* OLDDATE, NEWDATE
* DIRECTORY
* ACD, NOACD
* TREE, NOTREE
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
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 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 parameter of the RESTORE command lets you choose an error
recovery procedure. Your options are ONERROR=QUIT or ONERROR=SKIP. SKIP
is the default. You will only need to include the ONERROR parameter if
you do not wish to use the default.
If you specify QUIT, RESTORE terminates upon encountering a tape error.
If you specify SKIP, RESTORE skips the file in which the error occurred
and continues restoring files from the tape.
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 parameter. 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 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
which will by default RESTORE all files and create all missing
structures.
CAUTION Using this method, the CREATE parameter 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 parameter. 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 parameters 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 parameter 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 parameter 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 parameter cannot be used when the LOCAL parameter 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 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 (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 parameter 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 parameter. 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 parameters 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 file set
list display. LISTDIR may not be specified with any other parameter
except DIRECTORY.
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:
__________________________________________________________________________
| |
| |
| :RESTORE *T;@.SREXP.SYS;LISTDIR |
| |
| TURBO-STORE/RESTORE VERSION A.20.01 (C) 1986 HEWLETT-PACKARD CO. |
| WED, MAR 30, 1988, 10:59 AM |
| |
| MPEXL MEDIA DIRECTORY |
| |
| MEDIA NAME : STORE/RESTORE-HP/3000.MPEXL |
| MEDIA VERSION : MPEXL 08.50 FIXED ASCII |
| REEL NUMBER : 1 |
| |
| MEDIA CREATION DATE |
| WED, MAR 30, 1988, 10:53 AM |
| |
| MEDIA CREATED WITH THE FOLLOWING OPTIONS |
| |
| MEDIA RECORD SIZE : 16384 |
| INTERLEAVE DEPTH : 1 |
| |
| FILENAME GROUP ACCOUNT CREATOR REEL SET |
| TDORSERR.SREXP .SYS BOB >= 1 |
| TSRBUGFX.SREXP .SYS BOB >= 1 |
| TSRDOC .SREXP .SYS BOB >= 1 |
| TSRERR .SREXP .SYS BOB >= 1 |
| TSRGLOB .SREXP .SYS BOB >= 1 |
| TSRINCL1.SREXP .SYS BOB >= 1 |
| TSRINCL2.SREXP .SYS BOB >= 1 |
| TSRINLC3.SREXP .SYS BOB >= 1 |
| TSRTAPE .SREXP .SYS BOB >= 1 |
| |
| FILES RESTORED: 0 |
| |
__________________________________________________________________________
Figure 10-1. Sample RESTORE Command and Output
If any HFS syntax files exist on the media being examined, the resulting
listing will show the file names in HFS syntax. The names will be
displayed at the end of the line, similar to the HFS format for the SHOW
option.
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 file set 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 file set 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 file sets are scanned recursively,
regardless of their ending character. If NOTREE is specified, then NO
files or file sets are recursively scanned, resulting in a horizonal cut
in the directory structure.
MPE/iX 5.0 Documentation