RSTLIB (Restore Library)
Purpose
The Restore Library (RSTLIB) command restores to the system one library or a group of libraries that was saved by the Save Library (SAVLIB) command. The RSTLIB command restores the whole library, which includes the library description, object descriptions, and contents of the objects in the library.
For job queues, message queues, output queues, data queues, and logical files, only the object descriptions are restored, because only the definitions are saved. Also, logical file access paths may be restored if they were saved. More information on restoring access paths is in the Database Programming topic in the Information Center.
This command can be used to restore libraries whose objects had their storage freed by the corresponding SAVLIB command of the restore operation, or libraries deleted by the Delete Library (DLTLIB) command. If the data portions of the objects in the saved libraries were not freed, each library is copied into the same area of storage that it previously occupied. If the storage was freed, the system finds the needed storage to store the library contents (the object description and data portion of every file, module, program, service program, Structured Query Language (SQL) package, and journal receiver in the library). If the library does not exist on the system because it has been deleted or is being restored on a different system, the system must find the storage for everything that is in the library, including the library description.
When the owner profile does not exist on the system, the user profile of the system default owner (QDFTOWN) becomes the default owner of any object being restored in the system.
If an object already exists in the library in which it is being restored, the public and private authorities of the existing object are retained. If the object does not exist in the library, all public authorities are restored, but private authorities must be granted again. For an existing output queue object that is actively spooling during the restore operation, or a data queue that already exists in the library, the object is not restored, and a diagnostic message is sent.
If an object is being restored over an existing object on the system, the object auditing value of the existing object is kept. If the object is being restored as new to the system, the object auditing value is restored from the media. Additionally, if the object is a library, the default auditing value for each object created in the library is restored if the library is being restored as new; otherwise, the default auditing value is restored from the media.
Notes
- To restore a save file to a library where it does not already exist, a user must have authority to the Create Save File (CRTSAVF) command.
- The RSTLIB command ignores all file overrides currently in effect for the job, except the overrides for the restore output file.
Restrictions
- This command is shipped with public *EXCLUDE authority.
- The user of this command must have *SAVSYS authority specified in the user profile by the SPCAUT parameter, or must have all of the following:
- Read and add authority for, or be the owner of, each library specified.
- Object existence authority for, or be the owner of, each object in the library if the object already exists in the library on the system. Object existence and use authority are required for message queue objects. If the object does not exist, the user must have add authority for the user profiles that own each object being restored. If the user does not have the correct authority for all the libraries and objects specified, only those for which the authority has been given are restored.
- If VOL(*SAVVOL) is specified, use authority to the saved-from library.
- Use authority for the save file is required when restoring libraries from a save file. Use authority for the device description and the device file are required when restoring libraries from a tape, a diskette, or an optical device.
- When using a media definition, the user must have *USE authority to the media definition and *EXECUTE authority to the media definition library.
- The current versions of programs on the system should not be run while the library that contains those programs is being restored. If any program is running while it is being restored, the program will not be restored.
- When saving or restoring to an existing database file using the OUTFILE parameter, the user must have execute authority to the output file library.
Required Parameters
- SAVLIB
- Specifies the name of the library, or the *NONSYS, *ALLUSR, or *IBM group of libraries, to be restored on the system. You cannot specify *NONSYS, *ALLUSR, or *IBM if RSTLIB(*SAVLIB) is not specified.
Note: For values *NONSYS and *IBM, all other operations on the system must be ended before this option is specified. This requires ending all subsystems through the End Subsystem (ENDSBS(*ALL)) command or End System (ENDSYS) command. *NONSYS: Libraries saved by the Save Library (SAVLIB) command with LIB(*NONSYS) specified are restored.
You can do a RSTLIB SAVLIB(*IBM) and a RSTLIB SAVLIB(*ALLUSR) from a SAVLIB LIB(*NONSYS).
*IBM: Restores all system (IBM) libraries except for the following:
QDOC QRCLxxxxx QSYS2 QUSRINFSKR QDOCxxxx QRCYxxxxx QSYS2xxxxx QUSRNOTES QDSNX QRECOVERY QS36F QUSROND QGPL QRPLOBJ QTEMP QUSRPOSGS QGPL38 QRPLxxxxx QUSER38 QUSRPOSSA QMPGDATA QSPL QUSRADSM QUSRPYMSVR QMQMDATA QSPLxxxx QUSRBRM QUSRRDARS QMQMPROC QSRV QUSRDIRCL QUSRSYS QPFRDATA QSYS QUSRDIRDB QUSRVI QRCL QSYSxxxxx QUSRIJS QUSRVxRxMx
Note: A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support. The following libraries with names that do not begin with the letter Q are also restored:
#CGULIB #DSULIB #SEULIB #COBLIB #RPGLIB #DFULIB #SDALIBlibrary-name: Specify the name of the library to restore. The library name must be the same name that was used when the library was saved.
- DEV
- Specifies the name of the device used for the restore operation. The device name must already be known on the system by a device description.
*SAVF: The restore operation is done by using the save file specified on the SAVF parameter.
*MEDDFN: The restore operation is done using the devices and media identified in the media definition specified by the Media Definition (MEDDFN) parameter.
diskette-device-name: Specify the name of the diskette device that is used for the restore operation.
optical-device-name: Specify the name of the optical device used for the restore operation.
tape-media-library-device-name: Specify the name of the tape media library device used for the restore operation.
tape-device-name: Specify the names of one or more tape devices used for the restore operation. If more than one tape device is specified, they are used serially in the order in which they are specified. Using more than one tape device permits one tape volume to be rewound and unloaded while another tape device processes the next tape volume. To use more than one device in parallel, a media definition must be specified.
Optional Parameters
- VOL
- Specifies the volume identifiers of the media or the cartridge identifiers of tapes in a tape media library device, from which the objects are being restored. The volumes must be in the same order as they were when the data was saved. The volume that contains the beginning of the file to be restored should be placed in the device. More information on this parameter is in commonly used parameters.
*MOUNTED: The library is restored from the volumes that are currently placed in the device specified on the DEV parameter. For a media library device, the volume to be used is the next cartridge in the category mounted by the Set Tape Category (SETTAPCGY) command. The first version of the saved library that is found on the media is restored, unless a specific version is identified by the SAVDATE parameter and SAVTIME parameter, or for tape, the SEQNBR parameter.
Note: This value cannot be specified when using an optical media library device. *SAVVOL: The system, by using the save or restore history information, determines which volumes contain the most recently saved version of the library. If the device type specified in the DEV parameter does not match the device type of the most recently saved version of the library, an error message is sent to the user, and the function is ended. If *SAVVOL is specified, the parameters SAVDATE and SAVTIME cannot be specified. IF *SAVVOL is specified, *SEARCH must be specified on the SEQNBR parameter.
Note: If this is a restore from an optical device, only the first 6 characters of the volume name are available. If the volume name of the optical media exceeds 6 characters, the volume may not be found. You should specify the complete volume or file name on the command instead of using VOL(*SAVVOL) when the name of the optical media exceeds 6 characters. volume-identifier: Specify the identifiers of one or more volumes in the order they are placed in the device and used to restore the libraries.
- SEQNBR
- Specifies, only when tape is used, which sequence number is used for the restore operation.
*SEARCH: The tape is searched for a data file with an identifier that matches the LABEL parameter value; when a match is found, the data file is restored. If the last operation on the device specified ENDOPT(*LEAVE), the tape is positioned at the location where the last operation ended, and the file search starts with the first data file beyond the current tape position. If ENDOPT(*LEAVE) was not used for the last operation, or if the tape was manually rewound after an ENDOPT(*LEAVE) operation, the search starts with the first data file on the volume.
file-sequence-number: Specify the sequence number of the file. Valid values range from 1 through 16777215.
If *NONSYS, *ALLUSR, or *IBM is specified on the SAVLIB parameter, the sequence number specifies the location of the file QFILE. The QFILE file is at the beginning of the *NONSYS, *ALLUSR, or *IBM save operation. The QFILE file contains the list of libraries saved.
- LABEL
- Specifies the name that identifies the data file on the tape or diskette used for the restore operation. This must be the label specified on the save command.
*SAVLIB: The file label is the name of the library specified on the SAVLIB parameter.
data-file-identifier: Specify the data file identifier (up to 17 characters) of the data file used for the restore operation. This option is valid only for single library restore operations.
- ENDOPT
- Specifies the operation that is automatically performed on the tape or optical volume after the restore operation ends. If more than one volume is used, this parameter applies only to the last volume used; all other volumes are unloaded when the end of the volume is reached.
Note: This parameter is valid only if a tape or optical device name is specified on the DEV parameter. For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored. *REWIND: The tape is automatically rewound, but not unloaded, after the operation has ended.
*LEAVE: The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
*UNLOAD: The tape is automatically rewound and unloaded after the operation ends. Some optical devices will eject the volume after the operation ends.
- STRLIB
- Specifies the name of the starting library for a *NONSYS, *IBM, or *ALLUSR restore operation.
If an irrecoverable media error occurs during the restore operation, this parameter can be used to restart the operation.
This parameter is valid only when *NONSYS, *IBM, or *ALLUSR is specified for the restore operation.
Note: In the recovery steps that follow, *NONSYS is specified on the SAVLIB parameter. If you are restoring IBM-supplied libraries or all user-created libraries and IBM-supplied libraries, specify *IBM or *ALLUSR instead. The basic recovery steps for a restore operation are:
- Look at the job log to determine the library where the previous restore library (RSTLIB SAVLIB(*NONSYS)) command failed. Find the last library restored, which is indicated by a successful restore completion message.
- Load the first tape of the SAVLIB LIB(*NONSYS) media.
- Issue the following command:
RSTLIB SAVLIB(*NONSYS) DEV(tape-name) ENDOPT(*LEAVE) STRLIB(library-name) OMITLIB(library-name)where the library-name for the STRLIB and OMITLIB parameters is the library where the RSTLIB failed. This starts the restore operation on the library after the library where the restore operation failed.
- When you are prompted, load the volume containing the starting library.
- After the restore operation is complete, restore the library where the restore operation failed using the media from a previous save operation.
Note: Consider removing the tape with the media error from the next save rotation cycle to avoid another tape error.
*FIRST: The restore operation begins with the first library saved.
library-name: Specify the name of the library where the restore operation begins.
- OMITLIB
- Specifies a list of libraries to be excluded from the restore operation.
Note: This parameter is valid only when *NONSYS, *IBM, or *ALLUSR is specified on the SAVLIB parameter. *NONE: No libraries are excluded from the restore operation.
library-name: Specify the names of the libraries to be excluded from the restore operation.
- SAVF
- Specifies the qualified name of the save file used to restore the save data.
The name of the save file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
save-file-name: Specify the name of the file from which to perform the restore operation.
- MEDDFN
- Specifies the qualified name of the media definition that identifies the devices and media used to restore the data. For information about creating and using a media definition, see the Set up saves to multiple devices article in the Information Center.
Note: If a media definition is specified, the VOL, SEQNBR, SAVF, and OPTFILE parameters cannot be specified. The volume identifiers and sequence numbers are specified in the media definition. The name of the media definition can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
media-definition-name: Specify the name of the media definition.
- OPTION
- Specifies how to handle restoring each object.
*ALL: All the objects in the saved library are restored to the library. Old objects on diskette, tape, or in a save file replace the current versions in the library on the system, and the objects not having a current version are added to the library on the system. Objects presently in the library but not on the media, remain in the library.
*NEW: Only the objects in the saved library that do not exist in the current version of the library on the system are added to the library. Only objects not known to the library on the system are restored; known objects are not restored. This option restores objects that were deleted after they were saved or that are new to this library. If any saved objects have a version already in the library on the system, they are not restored, an informational message is sent for each object, and the restore operation continues.
*OLD: Only the objects in the library having a saved version are restored; that is, the version of each object currently in the library is replaced by the saved version. Only objects known to the library are restored. If any saved objects are no longer part of the online version of the library, they are not added to the library and an informational message is sent for each object, but the restore operation continues.
*FREE: The saved objects are restored only if they exist in the library on the system with their space freed. The saved version of each object is restored on the system in its previously freed space. This option restores objects that had their space freed when they were saved. If any saved objects are no longer part of the current version of the library, or if the space is not free for any object, the object is not restored and an informational message is sent for each object. The restore operation continues, and all of the freed objects are correctly restored.
- MBROPT
- Specifies, for database files currently on the system, which file members are restored.
Note: If MBROPT(*MATCH) is used, the member list in the saved file must match, member for member, the current version in the system. All members are restored for files that do not exist. Before restoring a file, the system verifies whether the file and member creation dates of the known system objects match the creation dates of the objects being restored. If verification fails, the file is not restored. *MATCH: The saved members are restored if the lists of the members where they exist match, member for member, the lists of the current system version. *MATCH cannot be specified if *ALL is specified on the ALWOBJDIF parameter.
*ALL: All members in the saved file are restored.
*NEW: Only new members (members not known to the system) are restored.
*OLD: Only members already known to the system are restored.
- SAVDATE
- Specifies the date the library was saved. If the most recently saved version is not restored, or if more than one saved version is on the volumes, enter the date that specifies which version of the library is restored. The date must be entered in the job date format. If separators (specified by the system value QDATSEP) are used, the value must be enclosed in apostrophes. If a volume identifier or VOL(*MOUNTED) is specified, but SAVDATE is not, the first version of the library found is restored. This parameter is valid only if a volume identifier is specified, VOL(*MOUNTED) is specified, or if a save file (SAVF parameter) is specified. Specify the date when the file was saved.
- SAVTIME
- Specifies the time when the library was saved, if the current version is not restored. The time can be specified with or without a time separator:
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds.
- With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.
If a volume identifier or *MOUNTED is specified on the VOL parameter, but this parameter is not, the first version of the library found on the volume is restored. This parameter is valid only if the SAVDATE parameter is also specified.
This parameter is valid only if SAVDATE is also specified.
- ALWOBJDIF
- Specifies whether certain differences encountered during a restore operation are allowed. The differences include:
- Ownership: The owner of an object on the system is different than the owner of an object from the save operation.
- Primary Group: The primary group of an object on the system is different than the primary group of an object from the save operation.
- File creation date: The creation date of the database file on the system does not match the creation date of the file that was saved.
- File level identifier: The file and/or member level identifier of a physical file on the save media is different than the file and/or member level identifier of the physical file on the system.
- Member creation date: The creation date of the database file on the system does not match the creation date of the member that was saved.
- Validation value verification: The validation value created at the time an object was created does not match the validation value created during the restore operation of an object on a system with a QSECURITY level of 40 or higher.
- Authorization list linking: The object is being restored to a system different from the one on which it was saved.
Note: The user of this parameter must have *ALLOBJ authority. If *ALL is specified, *MATCH cannot be specified on the MBROPT parameter. *NONE: None of the differences described above are allowed on the restore operation. For validation value verification failure cases, the object is restored but ownership is transferred to QDFTOWN and all authorities are revoked. For authorization list cases, the object is restored, but the object is not linked to the authorization list, and public authority is set to *EXCLUDE. For all other cases, a diagnostic message is sent for the object, and the object is not restored.
*ALL: All of the differences listed above are allowed for the restore operation. An informational message is sent, except for validation value verification and authorization list cases, and then the object is restored. The following facts should be noted:
- If the owners of the object do not match, the object is restored, but the ownership and authorities it had before the restore operation are retained.
- If the primary groups of the object do not match, the object is restored, but the primary group it had before the restore operation is retained.
- Either the file itself or members of the file are restored based on the following facts:
- If there is a file-level mismatch and ALWOBJDIF(*ALL) has been specified, the existing version of the file is renamed and the saved version of the file is restored.
- If there is a member-level mismatch, the existing version of the member is renamed and the saved version of the member is restored.
- Validation value verification:
- For programs with no validation value stored on the media (in reference to program data saved on an OS/400 system prior to version 1 release 3.0), the program is restored and the system does not attempt to recreate it. Nothing is logged in the security journal and no informational messages are sent.
- For programs that do have a validation value stored on the media and the system fails to recreate the program, the original version of the program is restored and an entry is logged in the security journal and job log.
- The informational message causes a diagnostic message to be sent indicating that security or integrity changes occurred during the restore operation. This results in sending an escape message for the restore operation.
- If the user is restoring objects to a system different from the one on which they were saved and the objects are secured by an authorization list, specifying *ALL automatically links the objects to the authorization list again. If the authorization list does not exist on the new system, a message that includes the name of the missing list is issued and the public authority is set to *EXCLUDE.
*FILELVL: The file and/or member level identifier of a physical file can be different. If a database physical file already exists on the system with a different file and/or member level identifier than the saved physical file, then an attempt will be made to restore the physical file data. The file and/or member level identifiers of the physical file on the system remain unchanged. Objects other than physical files will be restored as if ALWOBJDIF(*NONE) is specified.
- FRCOBJCVN
- Specifies whether to convert user objects to the format required for use in the current version of the operating system when the objects are restored.
Notes
- This parameter applies only to user objects of the *MODULE, *PGM, *SRVPGM, and *SQLPKG object types.
- An object must be observable (have the required observable information) in order to be converted.
- If an object needs to be converted (because it is formatted for an earlier version of the operating system), but is not converted during this restore operation, the object is automatically converted the first time it is used.
Element 1: Force Conversion
*SYSVAL: The objects are converted based on the value of the QFRCCVNRST system value.
*NO: The objects are not converted during the restore operation.
Note: If FRCOBJCVN(*NO) is specified, then the system value QFRCCVNRST must have a value of either "0," or "1,".> *YES: The objects are converted during the restore operation.
Notes
- Specifying this value increases the time of the restore operation, but avoids the need to convert the objects when they are first used.
- If FRCOBJCVN(*YES *RQD) is specified, then the QFRCCVNRST system value must have a value of "0,", "1,", or "2,". FRCOBJCVN(*YES *RQD) will override a QFRCCVNRST value of "0," or "1,". If FRCOBJCVN(*YES *ALL) is specified, then QFRCCVNRST can have any valid value and FRCOBJCVN(*YES *ALL) overrides the QFRCCVNRST system value.>
Element 2: Objects to Convert
*RQD: The objects are converted only if they require conversion to be used by the current operating system. If the objects are not observable, the objects are restored but are not converted.
*ALL: All objects are converted regardless of their current format. Even if the objects are in the current format, they are converted again. However, if the objects are not observable, the objects are not restored.
- RSTLIB
- Specifies whether the library contents are restored to the same library in which they were saved, or to a different library. If a different library is specified, the user cannot specify *NONSYS, *ALLUSR, or *IBM on the SAVLIB parameter.
*SAVLIB: The library contents are restored to the same library or libraries in which they were saved.
library-name: Specify the name of the library where the saved library contents are being restored. If *NONSYS, *ALLUSR, or *IBM is specified on the SAVLIB parameter, a library name cannot be specified on this parameter.
Note: If an SQL database is restored to a library other than the one in which it was saved, the journals are not restored. - RSTASPDEV
- Specifies the name of the auxiliary storage pool (ASP) device to which the data is restored.
*SAVASPDEV: The data is restored to the same auxiliary storage pool from which it was saved.
auxiliary-storage-pool-device-name: Specify the name of the independent ASP to which you want to restore the data.
- RSTASP
- Specifies whether the libraries and objects are restored to the same auxiliary storage pool (ASP) from which they were saved or to the system ASP (ASP number 1) or to a basic user ASP (ASP numbers 2-32).
A basic user ASP can contain either:
- Libraries and all objects in the libraries.
- Journals, journal receivers, and save files for libraries in the system ASP.
This parameter applies to all libraries that are specified. More information about user ASPs is in the Backup and recovery topic in the Information Center.
Attention:
System or product libraries (libraries that begin with a Q or #) must not be created in or restored to a user ASP. Doing so can cause unpredictable results.
*SAVASP: The objects are restored to the same auxiliary storage pools from which they were saved.
auxiliary-storage-pool-number: Specify the ASP number. When the specified ASP is 1, the objects are restored to the system ASP, otherwise the objects are restored to the basic user ASP specified. To restore libraries and objects to an independent ASP, use the RSTASPDEV parameter. >
- OUTPUT
- Specifies whether a listing that shows information about the status of the object is created and directed to an output file. The listing shows the restore information and shows all objects, restored, not restored, and excluded. Information about each object's security is listed for the restored objects. More information on this parameter is in commonly used parameters.
*NONE: No output listing is created.
*PRINT: The output is printed with the job's spooled output.
*OUTFILE: The output is directed to the database file specified on the OUTFILE parameter.
Note: You must specify a database file name on the OUTFILE parameter when OUTPUT(*OUTFILE) is specified. - OUTFILE
- Specifies the qualified name of the database file to which the information is directed when *OUTFILE is specified on the OUTPUT parameter. If the file does not exist, this command creates a database file in the specified library. If a new file is created, the system uses QASRRSTO in QSYS with the format name QSRRST as a model.
The name of the database file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file to which output from the command is directed. If this file does not exist, it is created in the specified library. More information on defining the format of database files as output files is in the Database Programming topic in the Information Center.
- OUTMBR
- Specifies the name of the database file member to which the output is directed. This parameter is valid only if OUTPUT(*OUTFILE) is specified.
Element 1: Member to Receive Output
*FIRST: The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified on the OUTFILE parameter.
member-name: Specify the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.
If the member exists, the user can add records to the end of the existing member or clear the existing member and add the records.
Element 2: Operation to Perform on Member
*REPLACE: The existing records in the specified database file member are replaced by the new records.
*ADD: The new records are added to the existing information in the specified database file member.
- INFTYPE
- Specifies the type of information directed to the database file. This parameter is valid only if OUTPUT(*OUTFILE) is specified.
*OBJ: The list contains an entry for each object requested to be restored.
*MBR: The list contains an entry for each object or, for database files, each member requested to be restored.
- OPTFILE
- Specifies the path name of the optical file that is used for the restore operation, beginning with the root directory of the volume. For more information on specifying path names, refer to path names.
'*': The system searches the root directory of the optical volume for the default name generated by the corresponding save operation.
'optical-directory-path-name/*': The system searches the specified directory of the optical volume for the default name generated by the corresponding save operation.
'optical-file-path-name': Specify the path name of the optical file.
Examples for RSTLIB
Example 1: Restoring New Objects
RSTLIB SAVLIB(JOE) DEV(TAP01) OPTION(*NEW)This command restores the saved version of library JOE from tape device TAP01. The only objects that are restored in the library are new objects (ones that were in the library when they were saved and later deleted).
Example 2: Printing Output
RSTLIB SAVLIB(*NONSYS) DEV(TAP01) OUTPUT(*PRINT)This command restores all the saved user-created libraries, the QGPL library, and the licensed program libraries (such as QRPG and QIDU) to the system from tape. The contents of the libraries are restored exactly as they were saved. New objects (on tape) are added to the system; old objects in the system are overlaid by the version of the old objects on tape. Because OUTPUT(*PRINT) is specified, a printout of all objects (restored and not restored) for each library, is sent to the printer with the job's spooled output. Each library after the first library starts on a new page. After each library, a completion message states how many objects were restored and how many were not restored. At the end of a list, a final completion message states how many libraries were restored and how many were not restored.
Example 3: Specifying Where the Restore Operation Begins
RSTLIB SAVLIB(*NONSYS) DEV(TAP01) STRLIB(MIKESLIB)This command restores the saved nonsystem libraries beginning with library MIKESLIB from the tape device, TAP01. The nonsystem libraries are saved in alphabetic order. Therefore, all libraries beginning with and following the name MIKESLIB are restored. The first tape of the nonsystem save must be loaded. An inquiry message instructs the user to load the tape containing MIKESLIB. If necessary, the same message is sent until the tape containing MIKESLIB is found.
Example 4: Restoring a Version From a Specific Date and Time
RSTLIB SAVLIB(PAYROLL) DEV(TAP01) SAVDATE(060193) SAVTIME(103214) RSTLIB(OLDPAY) VOL(PAY)This command restores the version of the PAYROLL library from the device TAP01, whose volume identifier is PAY. The version to be restored was saved at 10:32:14 on the date 06/01/93. All of the objects in the saved PAYROLL library are restored to the library OLDPAY. All new files are restored. Old files are restored only if the member lists of the files on the tape match the member lists of the files on the system.
Example 5: Restoring From Multiple Tape Volumes
RSTLIB SAVLIB(QGPL) DEV(TAP01) VOL(QGPL QGPL)This command restores the QGPL library from two tape volumes both named QGPL. Even though the volume identifiers are the same, they must both be specified.
Example 6: Restoring From Multiple Tape Devices Serially
RSTLIB SAVLIB(USRLIB) DEV(TAP01 TAP02 TAP03) VOL(USRA USRB USRC USRD) ENDOPT(*UNLOAD)This command restores library USRLIB from four volumes on three tape devices. Volume USRA is put on tape device TAP01, volume USRB on TAP02, volume USRC on TAP03, and volume USRD on TAP01. The operator removes volume USRA from TAP01, so that TAP01 can be used by volume USRD. If the tape volumes are put in the wrong order, an error message is sent to the system operator message queue.
Example 7: Restoring From Multiple Devices in Parallel
RSTLIB SAVLIB(USRLIB) DEV(*MEDDFN) MEDDFN(LIBA/MEDDFNA)This command restores library USRLIB using the devices and volumes specified in the media definition named MEDDFNA in library LIBA. For information about creating and using a media definition, see the Backup and recovery topic in the Information Center.
Example 8: Restoring a Specific Version
RSTLIB SAVLIB(LIB1) DEV(TAP01) MBROPT(*ALL) SAVDATE(082392) SAVTIME(123251) RSTLIB(LIB2) OUTPUT(*PRINT)This command restores the version of library LIB1 from the device TAP01. The version to be restored was saved at 12:32:51 on the date 08/23/92. All of the objects in the saved library LIB1 are restored to library LIB2. A list of restored objects and those not restored is given. All files and file members are restored.
Example 9: Restoring a Library From a Save File
RSTLIB SAVLIB(LIB1) DEV(*SAVF) SAVF(SAVF1)This command restores library LIB1 from the save file SAVF1.
Example 10: Restoring to a Basic User ASP
RSTLIB SAVLIB(LIB1) DEV(*SAVF) SAVF(SAVF1) RSTASP(2)This command restores the library named LIB1 from the save file named SAVF1. The library and all objects in the saved version of LIB1 are restored to basic user ASP 2 unless:
- The library already exists in a different ASP.
- ASP 2 contains a journal, journal receiver, or SAVF which is part of a library in the system ASP.
- ASP 2 does not exist on the system.
- There are object types in the library which cannot be restored to user ASPs. These objects will not be restored.
Example 11: Restoring to an Independent ASP
RSTLIB SAVLIB(LIB1) DEV(*SAVF) SAVF(SAVF1) RSTASPDEV(DIVISION1)This command restores the library named LIB1 from the save file named SAVF1. The library and all objects in the saved version of LIB1 are restored to the independent ASP named DIVISION1 unless:
- The library already exists in the system ASP, a basic user ASP, or a different independent ASP in the same linked ASP group as DIVISION1.
- ASP DIVISION1 is not available on the system.
- There are object types in the library which cannot be restored to independent ASPs. These objects will not be restored.
Error messages for RSTLIB
*ESCAPE Messages
- CPFACDE
- Unconverted M36 exists. Restore not allowed.
- CPF370C
- Not authorized to ALWOBJDIF parameter.
- CPF3705
- &2 &1 in &3 not journaled.
- CPF3706
- &2 &1 not restored to library &3.
- CPF3707
- Save file &1 in &2 contains no data.
- CPF3709
- Tape devices do not support same densities.
- CPF372C
- Library &1 not restored to ASP &2.
- CPF3727
- Duplicate device &1 specified on device name list.
- CPF3728
- Device &1 specified with other devices.
- CPF373E
- Library &1 not restored to ASP &2.
- CPF3730
- Not authorized to &2 &1 in library &3.
- CPF3731
- Cannot use &2 &1 in library &3.
- CPF3732
- &2 &1 status changed during restore operation.
- CPF3733
- &2 &1 in &3 previously damaged.
- CPF3738
- Device &1 used for save or restore is damaged.
- CPF3739
- Database file &1 member in &3 damaged.
- CPF3740
- Object &1 type &2 in &3 not found.
- CPF3743
- File cannot be restored, displayed, or listed.
- CPF3748
- Object information for library &1 damaged.
- CPF375F
- File not selected. Cannot restore from save type file &1.
- CPF3752
- No record of save operation exists for library &1.
- CPF3757
- &2 &1 not restored to &3.
- CPF3758
- &2 &1 not restored to &3.
- CPF376B
- File &1 not found.
- CPF3767
- Device &1 not found.
- CPF3768
- Device &1 not valid for command.
- CPF3769
- File found on media not save/restore file.
- CPF3770
- No objects saved or restored for library &1.
- CPF3773
- &1 objects restored. &2 not restored to &4.
- CPF3779
- &1 libraries restored; &4 partially restored; &2 not restored.
- CPF378B
- Library &1 not created.
- CPF3780
- Specified file for library &1 not found.
- CPF3782
- File &1 in &2 not a save file.
- CPF3783
- Cannot determine VOL(*SAVVOL) location. No objects restored.
- CPF3784
- Restore device specified in the DEV parameter does not match VOL(*SAVVOL) device.
- CPF3785
- Not all subsystems ended.
- CPF3791
- While processing &2 &1 in &3, encountered end of file &4.
- CPF3793
- Machine storage limit reached.
- CPF3794
- Save or restore operation ended unsuccessfully.
- CPF3796
- Storage limit exceeded for user profile &4.
- CPF380E
- User profile &1 not restored. Not able to create UID or GID.
- CPF3805
- Objects from save file &1 in &2 not restored.
- CPF3807
- Data decompression error for save file &1 in &2.
- CPF3812
- Save file &1 in &2 in use.
- CPF3818
- Starting library &1 not found.
- CPF384F
- &2 &1 not restored to library &3.
- CPF3894
- Cancel reply received for message &1.
- CPF5729
- Not able to allocate object &1.
- CPF9809
- Library &1 cannot be accessed.
- CPF9812
- File &1 in library &2 not found.
- CPF9814
- Device &1 not found.
- CPF9820
- Not authorized to use library &1.
- CPF9822
- Not authorized to file &1 in library &2.
- CPF9825
- Not authorized to device &1.
- CPF9829
- Auxiliary storage pool &1 not found.
- CPFB8ED
- Device description &1 not correct for operation.
- OPT1498
- Volume name list exhausted on device &1.
- OPT1502
- Attempted to process past the end of a multi-volume set.
- OPT1605
- Media or device error occurred.
*STATUS Messages
- CPF3770
- No objects saved or restored for library &1.
- CPF3773
- &1 objects restored. &2 not restored to &4.