Restrictions when using the Restore command
The Restore (RST) command can be used to restore objects to any file system. This topic describes restrictions that apply when using the RST command.
Restrictions when restoring objects to multiple file systems: When you use the RST command to restore objects to more than one file system at the same time and the file systems include the QSYS.LIB file system or the QDLS file system, the following restrictions apply:
- Different file systems support different types of objects and different
methods of naming objects. Therefore, when you restore objects from more than
one file system with the same command, you cannot specify object names or
object types. You can restore all objects from all file systems, or you can
omit some file systems. These combinations are valid:
- Restoring all objects on the system: OBJ('/*') Note: Using this command is not the same as using option 21 from the Restore menu. The differences between RST OBJ('/*') and option 21 are as follows:
- RST OBJ('/*') does not put the system in a restricted state.
- RST OBJ('/*') does not start the controlling subsystem when it finishes.
- RST OBJ('/*') does not provide prompting to change default options.
- Restoring all objects in all file systems except the QSYS.LIB file system and the QDLS file system: OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT))
- Restoring all objects in all file systems except the QSYS.LIB file system, the QDLS file system, and one or more other file systems: OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT) ('/other values' *OMIT))
- Restoring all objects on the system: OBJ('/*')
- Values for other parameters of the RST command are supported only for
some file systems. You must choose values that are supported by all file systems.
Specify the following parameters and values:
- OPTION
- *ALL
- ALWOBJDIF
- *NONE or *ALL
- LABEL
- *SEARCH
- OUTPUT
- *NONE
- SUBTREE
- *ALL
- SYSTEM
- *LCL
- DEV
- (Must be a tape device or an optical device)
- VOL
- *MOUNTED
- When you specify RST OBJ('/*'), the following situations applies:
- The system restores only objects that are saved by SAV OBJ('/*').
- The system must be in a restricted state.
- You must have *SAVSYS or *ALLOBJ special authority.
- You cannot specify the save file for the DEV parameter.
- You must specify SEQNBR(*SEARCH).
Note: RST OBJ('/*') is not the suggested method for restoring the entire system. Selecting the appropriate recovery strategy describes how to determine the recovery procedure for your situation.
Restrictions when restoring objects to the QSYS.LIB file system: When you use the RST command to restore objects to the QSYS.LIB (library) file system, the following restrictions apply:
- The OBJ parameter must have only one name.
- You specify objects in the same way that you specify them on the RSTOBJ
command and the RSTLIB command. Table 1 shows
the valid options for the Object (OBJ) parameter when restoring objects to
the QSYS.LIB file system and the equivalent Restore Object (RSTOBJ) or Restore
Library (RSTLIB) command:
Table 1. Using the RST Command for QSYS.LIB Objects Object parameter on RST command Equivalent RSTxxx command OBJ('/QSYS.LIB/library-name.LIB') RSTLIB SAVLIB(library-name) OBJ('/QSYS.LIB/library-name.LIB/*') RSTOBJ SAVLIB(library-name) OBJ(*ALL) OBJTYPE(*ALL)
OBJ('/QSYS.LIB/library-name.LIB/*.object-type') RSTOBJ SAVLIB(library-name) OBJ(*ALL) OBJTYPE(object-type) FILEMBR(*ALL)
OBJ('/QSYS.LIB/library-name.LIB/object-name.object-type') RSTOBJ SAVLIB(library-name) OBJ(object-name) OBJTYPE(object-type)
OBJ('/QSYS.LIB/library-name.LIB/file-name.FILE/*') RSTOBJ SAVLIB(library-name) OBJ(file-name) OBJTYPE(*FILE)
OBJ('/QSYS.LIB/library-name.LIB/file-name.FILE/*.MBR') RSTOBJ SAVLIB(library-name) OBJ(file-name) OBJTYPE(*FILE)
OBJ('/QSYS.LIB/library-name.LIB/file-name.FILE/ member-name.MBR')
RSTOBJ SAVLIB(library-name) OBJ(file-name) OBJTYPE(*FILE) FILEMBR((*ALL) (member-name))
- You can specify only object types that are allowed on the RSTOBJ command. For example, you cannot use the RST command to restore user profiles because OBJTYPE(*USRPRF) is not allowed on the RSTOBJ command.
- Some libraries in the QSYS.LIB file system cannot be restored with the
RSTLIB command because of the type of information they contain. Here are several
examples:
- The QDOC library, because it contains documents.
- The QSYS library, because it contains system objects.
QDOC QSRV QSPLxxxx2 QDOCxxxx1 QSPL QRECOVERY QSYS QRPLOBJ QTEMP 1 Where xxxx is a value from 2 to 32, corresponding to an ASP. 2 Where xxxx is a value from 2 to 255, corresponding to an ASP. - You can use the new-name element of the object parameter to rename an
object in a directory, restore an object to a different directory, or restore
an object to a different library. Table 2 shows
some examples:
Table 2. New name options on the RST command–Examples Object parameter on RST command Results OBJ(('/DBSDIR/FILEB' *INCLUDE '/DBSDIR/FILEX')) FILEX is created in the DBSDIR directory. The data that was saved with FILEB is restored to FILEX. If FILEB still exists on the system, it is not changed. OBJ(('/DBSDIR/FILE*' *INCLUDE '/LMSDIR)) Restores all objects from the DBSDIR whose names begin with FILE to the LMSDIR directory. OBJ(('/QSYS.LIB/LIB1.LIB' *INCLUDE '/QSYS.LIB/LIB2.LIB')) Library LIB1 (and all objects) are restored as library LIB2. OBJ(('/QSYS.LIB/LIB1.LIB/*' *INCLUDE '/QSYS.LIB/LIB2.LIB')) All the objects of library LIB1 are restored into library LIB2. OBJ(('QSYS.LIB/LIB1.LIB/*.type' *INCLUDE '/QSYS.LIB/LIB2.LIB/*.type'))
All objects of type 'type' from library LIB1 are restored into library LIB2. - For database file members, OPTION(*NEW) restores members for new files only.
- Other parameters must have these values:
- SUBTREE
- *ALL
- SYSTEM
- *LCL
- OUTPUT
- *NONE
- ALWOBJDIF
- *ALL or *NONE
- You can only rename the library, you cannot rename the object. The new
name must be *SAME or
/QSYS.LIB/libname.LIB
where the library that is specified by libname must exist.
Restrictions when restoring objects to the QDLS file system: When you use the RST command to restore objects to the QDLS (document library services) file system, the following restrictions apply:
- The OBJ parameter must have only one name.
- The OBJ and SUBTREE parameters must be one of the following items:
- OBJ('/QDLS/path/folder-name') SUBTREE(*ALL)
- OBJ('/QDLS/path/document-name') SUBTREE(*OBJ)
- Other parameters must have these values:
- SYSTEM
- *LCL
- OUTPUT
- *NONE
- ALWOBJDIF
- *ALL or *NONE
- OPTION
- *ALL