SAVRST (Save/Restore Objects)
Purpose
The Save/Restore Objects (SAVRST) command saves and restores a copy of one or more objects that can be used in the integrated file system.
For more information about integrated file system commands, see the Integrated File System Introduction topic in the Information Center.
The SAVRST command uses the current save and restore support for objects in libraries and for document library objects. As a result, there are restrictions when you use the SAVRST command on these objects.
Restrictions
- For name patterns in the root directory:
- OBJ must be one of the following:
- OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT))
- OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT) ('/other values' *OMIT)
- For names involving objects in libraries:
- OBJ must have only one name, except when omitting /QSYS.LIB from /*
- OBJ must be one of the following:
- OBJ('/QSYS.LIB/libname.LIB')
- OBJ('/QSYS.LIB/libname.LIB/*')
- OBJ('/QSYS.LIB/libname.LIB/*.type')
- OBJ('/QSYS.LIB/libname.LIB/objname.type')
- OBJ('/QSYS.LIB/libname.LIB/filename.FILE/*')
- OBJ('/QSYS.LIB/libname.LIB/filename. FILE/*.MBR')
- OBJ('/QSYS.LIB/libname.LIB/filename. FILE/membername.MBR')
- OBJ('/QSYS.LIB/*.type')
- OBJ('/QSYS.LIB/objname.type')
- OBJ('/QSYS.LIB/filename.FILE/*')
- OBJ('/QSYS.LIB/filename.FILE/*.MBR')
- OBJ('/QSYS.LIB/filename. FILE/membername.MBR')
- The .type must be an object type supported by SAVOBJ and RSTOBJ
- libname cannot be QDOC, QDOCxxxx, QRCYxxxxx, QRECOVERY, QRPLOBJ, QRPLxxxxx, QSPL, QSPLxxxx, QSRV, QSYS, QSYSxxxxx, QTEMP, or QSR if libname.LIB is the last component of the name
- SUBTREE must be *ALL
- For SAVRST:
- CHGPERIOD end date and end time must be *ALL
- CHGPERIOD must be default if a file member is specified
- An object cannot be renamed
- For database file members, OPTION(*NEW) only restores members for new files
- For names involving document library objects:
- OBJ must have only one name, except when omitting /QDLS from /*
- OBJ and SUBTREE must be one of the following:
- OBJ('/QDLS/path/foldername') SUBTREE(*ALL)
- OBJ('/QDLS/path/documentname') SUBTREE(*OBJ)
- For SAVRST:
- The defaults must be taken on the PRECHK and SAVACTMSGQ parameters
- CHGPERIOD must be default with OBJ('/QDLS/path/documentname') SUBTREE(*OBJ)
- CHGPERIOD start date cannot be *LASTSAVE
- CHGPERIOD end date and end time must be *ALL
- SAVACT cannot be *SYNC
- SAVACTMSGQ must be *NONE
- ALWOBJDIF must be *NONE or *ALL
- OPTION must be *ALL
- Both systems intended to participate in the save and restore operation must be connected to the same APPN network, or, if the OptiConnect/400 option is to be used, both systems must be joined by the OptiConnect for OS/400 hardware and software.
Required Parameters
- RMTLOCNAME
- Specifies the remote location to connect with. Specify the remote location name using the format cccccccc or nnnnnnnn.cccccccc, where nnnnnnnn is the network identifier (ID) and cccccccc is the remote location name.
remote-location-name: Specify the remote location name associated with the system to which you want to restore objects. The local network ID (LCLNETID) network attribute is used as the value of the network identifier.
network-ID.location-name: Specify the network identifier and the remote location name associated with the system to which you want to restore objects.
Optional Parameters
- OBJ
- Specify the objects to save and restore.
Note: The objects will be restored with the same name. This parameter is the same as the OBJ parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- SUBTREE
- This parameter is the same as the SUBTREE parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- CHGPERIOD
- This parameter is the same as the CHGPERIOD parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- TGTRLS
- Specifies the release level of the operating system on which you intend to use the object being saved.
When specifying the target-release value, the format VxRxMx is used to specify the release, where Vx is the version, Rx is the release, and Mx is the modification level. For example, V3R6M0 is version 3, release 6, modification level 0.
Valid values depend on the current version, release, and modification level, and they change with each new release. See the Valid Values for TGTRLS Parameter table in the Backup and recovery topic in the Information Center for a complete list of valid values.
*CURRENT: The object is to be restored to, and used on, the release of the operating system currently running on your system. The object can also be restored to a system with any subsequent release of the operating system installed.
*PRV: The object is to be restored to the previous release with modification level 0 of the operating system. The object can also be restored to a system with any subsequent release of the operating system installed.
target-release: Specify the release in the format VxRxMx. The object can be restored to a system with the specified release or with any subsequent release of the operating system installed.
- PRECHK
- This parameter is the same as the PRECHK parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- SAVACT
- This parameter is the same as the SAVACT parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- SAVACTMSGQ
- This parameter is the same as the SAVACTMSGQ parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- ASPDEV
- This parameter is the same as the ASPDEV parameter for the SAV command. If you need further assistance, go to the documentation for the SAV command in this book to see a detailed parameter description.
- OPTION
- This parameter is the same as the OPTION parameter for the RST command. If you need further assistance, go to the documentation for the RST command in this book to see a detailed parameter description.
- ALWOBJDIF
- This parameter is the same as the ALWOBJDIF parameter for the RST command. If you need further assistance, go to the documentation for the RST command in this book to see a detailed parameter description.
- FRCOBJCVN
- This parameter is the same as the FRCOBJCVN parameter for the RST command. If you need further assistance, go to the documentation for the RST command in this book to see a detailed parameter description.
Examples for SAVRST
Example 1: Saving and Restoring a Member Object
SAVRST RMTLOCNAME(SYSTEM1) OBJ(('QSYS.LIB/JTEMP.LIB/ZXC.FILE/QYYCPDGT.MBR'))This command saves the QYYCPDGT member object from the ZXC file, in library JTEMP and restores the object on the remote location named SYSTEM1.
Example 2: Saving and Restoring a Directory
SAVRST RMTLOCNAME(SYSTEM2) OBJ(('MYDIR')) SAVACT(*YES) SAVACTMSGQ('QSYS.LIB/SVRTEST.LIB/ZXC.MSGQ')This command saves the MYDIR directory while active, and will use the ZXC message queue to save messages.
Error messages for SAVRST
*ESCAPE Messages
- CPCAD80
- &1 objects saved and restored.
- CPFAD8D
- An error occurred during the &1 operation.
- CPFAD80
- Unable to establish connection from &1 to &2.
- CPFAD81
- User profile &1 not found on remote location &2.
- CPFAD82
- Remote location &1 not found.
- CPFAD83
- Remote location &1 cannot be source location.
- CPFAD84
- ObjectConnect/400 internal error, function code &1, return code &2.
- CPFAD86
- Location name &1 unable to close &2.
- CPFAD88
- Unable to establish connection from &1 to &2.
- CPFAD93
- APPC failure. Failure code is &3.
- CPF389C
- ObjectConnect/400 internal error, function code &1, return code &2.