Restore System Information (RSTSYSINF)

The Restore System Information (RSTSYSINF) command restores the subset of system data and objects saved by the Save System Information (SAVSYSINF) command.

RSTSYSINF is not to be used for system upgrades or migrations.

Security related system values may not be restored if they have been locked. For information on how to lock and unlock security related system values, see the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

The QPWDLVL (Password level) system value will not be restored. See Planning Password Level Changes in Chapter 7 of the System i Security Reference, SC41-5302 before changing the QPWDLVL system value. Also, based on the current setting of the QPWDLVL system value, QPWDMAXLEN (Maximum password length), QPWDMINLEN (Minimum password length), and QPWDVLDPGM (Password validation program) system values may not be restored.

Note: The RSTSYSINF command issues several restore commands for restoring objects. Parameters may or may not be used for all restore commands.

For more information, refer to the Backup and recovery topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Parameters

Keyword Description Choices Notes
DEV Device Single values: *SAVF
Other values (up to 4 repetitions): Name
Required, Positional 1
VOL Volume identifier Single values: *MOUNTED
Other values (up to 75 repetitions): Character value
Optional
SEQNBR Sequence number 1-16777215, *SEARCH Optional
ENDOPT End of media option *REWIND, *LEAVE, *UNLOAD Optional
SAVF Save file Qualified object name Optional
Qualifier 1: Save file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OPTFILE Optical file Path name, * Optional
OUTPUT Output *NONE, *PRINT, *OUTFILE Optional
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD

Device (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.

This is a required parameter.

Single values

*SAVF
The restore operation is done using the save file specified for the Save file (SAVF) parameter.

Other values

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 a virtual tape device is used, it must be the only device specified. If you are using more than one tape device (up to a maximum of four), specify the names of the devices in the order in which they are used. When more than one tape volume is to be restored, using more than one tape device permits one tape volume to be rewound while another tape device processes the next tape volume.

Volume identifier (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.

Single values

*MOUNTED
The objects are restored from the volumes placed in the device specified for the Device (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.

Note: This value cannot be specified when using an optical media library device.

Other values (up to 75 repetitions)

character-value
Specify the identifiers of one or more volumes in the order in which they are placed in a device and used to restore the data.

Sequence number (SEQNBR)

Specifies the sequence number that is used for the restore operation.

*SEARCH
The volume placed in a device is searched for a data file containing the saved system information objects. When a match is found, the system information objects are restored.
1-16777215
Specify the sequence number of the file to be used for the restore operation.

End of media option (ENDOPT)

Specifies the operation that is automatically done 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 for 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.

Save file (SAVF)

Specifies the save file used to restore the data.

Note: A value must be specified for this parameter if *SAVF is specified for the Device (DEV) parameter.

Qualifier 1: Save file

name
Specify the name of save file to be used.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is used to locate the save file. If no current library entry exists in the library list, the QGPL library is used.
name
Specify the name of the library where the save file is located.

Optical file (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 "Object naming rules" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

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

Output (OUTPUT)

Specifies whether a listing that shows information about the status of the objects 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.

*NONE
No output is created.
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Note: You must specify a database file name for the OUTFILE parameter when OUTPUT(*OUTFILE) is specified.

File to receive output (OUTFILE)

Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

Qualifier 1: File to receive output

name
Specify the name of the database file to which the command output is directed.

Qualifier 2: Library

*LIBL
The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.
*CURLIB
The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the name of the library to be searched.

Note: If a new file is created, the system uses the IBM-supplied file QASRRSTO with format name QSRRST as a model.

Output member options (OUTMBR)

Specifies the name of the database file member to which the output is directed when *OUTFILE is specified for the Output (OUTPUT) parameter.

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 for the File to receive output (OUTFILE) parameter.
name
Specify the name of 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, you can add records to the end of the existing member or clear the existing member and add the records.

Element 2: Replace or add records

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

Examples

Example 1: System Information Restored from TAP01

RSTSYSINF   DEV(TAP01)

This command restores the system information from the tape put on the TAP01 tape drive.

Example 2: System Information Restored from SAVF and Printed Output Generated

RSTSYSINF   DEV(*SAVF)  SAVF(QGPL/SAVF)  OUTPUT(*PRINT)

This command restores the system information from the save file named SAVF in library QGPL. Information about what was restored will be written to a spooled file.

Error messages

*ESCAPE Messages

CPF38A8
RSTSYSINF completed. One or more objects not restored.