Start of changeEnd of change

Save Restore (SAVRST)

The Save/Restore IFS (SAVRST) command saves and restores a copy of one or more objects, that can be used in the integrated file system (IFS).

For more information about integrated file system commands, see the Integrated file system topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

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.

Notes:

    Start of change
  1. When the connection type is *IP, this command communicates with remote system using TCP/IP, and Enterprise Extender is not used. The ObjectConnect server is required to be active on the remote system.End of change
  2. Start of change
  3. When the connection type is *DB2MIRROR, this command communicates with remote system using the System Object Replication Network Redundancy Group (NRG). The ObjectConnect for Db2 Mirror server is required to be active on the remote system and the System Object Replication NRG is active.End of change
  4. Start of change
  5. When the connection type is *SNA, RMTPORT, RMTUSER and RMTPWD are ignored. If an OptiConnect connection is active, OptiConnect is used to access the remote system.
  6. End of change

Restrictions:

  1. For name patterns in the root directory:
    1. OBJ must be one of the following:
      • OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT))
      • OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT) ('/other values' *OMIT)
  2. For names involving objects in libraries:
    1. OBJ must have only one name, except when omitting /QSYS.LIB from /*
    2. 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')
    3. The .type must be an object type supported by SAVOBJ and RSTOBJ
    4. libname cannot be QSYS, QDOC, QDOCxxxx, QTEMP, QSPL, QSPLxxxx, QSRV, QRECOVERY, QPTFOBJ1, QPTFOBJ2, QRPLOBJ, or QSR if libname.LIB is the last component of the name
    5. SUBTREE must be *ALL
    6. 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
  3. For names involving document library objects:
    1. OBJ must have only one name, except when omitting /QDLS from /*
    2. OBJ and SUBTREE must be one of the following:
      • OBJ('/QDLS/path/foldername') SUBTREE(*ALL)
      • OBJ('/QDLS/path/documentname') SUBTREE(*OBJ)
    3. 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
  4. Start of change
  5. Both systems intended to participate in the save and restore operation must be connected to the same Remote Direct Memory Access (RDMA) connection, or the interworking ethernet network, or the same APPN network, or if the OptiConnect for IBM i option is to be used, both systems must be joined by the OptiConnect for IBM i hardware and software.End of change
Start of changeEnd of change

Parameters

Start of changeEnd of change
Keyword Description Choices Notes
Start of changeRMTLOCNAMEEnd of change Remote location name Character value Optional, Positional 1
OBJ Objects Values (up to 50 repetitions): Element list Start of changeOptional, Positional 2End of change
Element 1: Name Path name, *
Element 2: Include or omit *INCLUDE, *OMIT
PATTERN Name pattern Values (up to 50 repetitions): Element list Optional
Element 1: Pattern Character value, *
Element 2: Include or omit *INCLUDE, *OMIT
Start of changeCNNTYPEend of change Start of changeConnection typeend of change Start of change*SNA, *IP, *DB2MIRRORend of change Start of changeOptionalend of change
Start of changeRMTPORTend of change Start of changeRemote portend of change Start of change1-65534, *DFTend of change Start of changeOptionalend of change
Start of changeRMTUSERend of change Start of changeRemote user IDend of change Start of changeName, *NONE, *SVRAUT, *CURRENT, *KERBEROSend of change Start of changeOptionalend of change
Start of changeRMTPWDend of change Start of changeRemote passwordend of change Start of changeCharacter value, *NONEend of change Start of changeOptionalend of change
OUTPUT Output *NONE, *PRINT Optional
SUBTREE Directory subtree *ALL, *DIR, *OBJ, *NONE Optional
RBDMFS Rebuild mounted file system *NONE, *UDFS Optional
CHGPERIOD Time period for last change Element list Optional
Element 1: Start date Date, *ALL
Element 2: Start time Time, *ALL
Element 3: End date Date, *ALL
Element 4: End time Time, *ALL
TGTRLS Target release Simple name, *CURRENT, *PRV Optional
PRECHK Object pre-check *NO, *YES Optional
SAVACT Save active *NO, *YES, *SYNC Optional
SAVACTMSGQ Save active message queue Path name, *NONE, *WRKSTN Optional
ASPDEV ASP device Name, *ALLAVL, *, *SYSBAS, *CURASPGRP Optional
OPTION Option *ALL, *NEW, *OLD Optional
ALWOBJDIF Allow object differences Single values: *NONE, *ALL
Other values (up to 2 repetitions): *OWNER, *AUTL, *PGP
Optional
FRCOBJCVN Force object conversion Single values: *SYSVAL, *NO
Other values: Element list
Optional
Element 1: Convert during restore *YES
Element 2: Objects to convert *RQD, *ALL
SCAN Scan objects Element list Optional
Element 1: Scan during save *NO, *YES
Element 2: Save failed objects *NOSAVFAILED, *SAVFAILED
PVTAUT Private authorities *NO, *YES Optional
CRTPRNDIR Create parent directories *NO, *YES Optional
PRNDIROWN Parent directory owner Simple name, *PARENT Optional
STRJRN Start journaling *YES, *NO Optional

Remote location (RMTLOCNAME)

Start of change

Specifies the remote system and the type of connection used to connect to the remote system.End of change

Start of change

This is a required parameter when CNNTYPE is *IP or *SNA.End of change

character-value
The syntax for this element is dependent on the value specified for the second element:
    Start of change
  • When the connection type is *SNA, specify the name of the remote system using the format nnnnnnnn.cccccccc, where nnnnnnnn is the network identifier (ID) and cccccccc is the remote location name. If no network ID is specified, the network attributes are used to determine the default network ID.End of change
  • Start of change
  • When the connection type is *IP, specify a host name or an internet address to identify the remote system. Host names must follow these conventions:End of change
    • The first character must be either A through Z or 0 through 9.
    • The last character must be either A through Z, 0 through 9, or a period (.).
    • Blanks ( ) are not allowed.
    • The special characters, period (.), underscore (_), and minus (-) are allowed.
    • Parts of the name separated by periods (.) cannot exceed 63 characters in length.

      Note: Each part of the name separated by periods (.) must begin and end with an English alphabetic character or a numeric character.

    • Names must be from 1 to 255 characters in length.

    The IPv4 address is specified in the form nnn.nnn.nnn.nnn where nnn is a decimal number ranging from 0 through 255. An IPv4 Internet address is not valid if it has a value of all binary ones or all binary zeros for the network identifier (ID) portion or the host ID portion of the address.

    The IPv6 address is specified in the form x:x:x:x:x:x:x:x where x is a hexadecimal number ranging from 0 through X'FFFF'. "::" may be used once in the IPv6 address to indicate one or more groups of 16 bits of zeros. The "::" may be used to compress leading, imbedded, or trailing zeros in the address.

    If the Internet address is entered from a command line, the address must be enclosed in single quotation marks.

Objects (OBJ)

Specifies the objects to be saved. You can specify an object name pattern for the path name to be used. When a path name is specified that could match many objects, you can specify a value for the Name pattern (PATTERN) parameter to subset the objects that are to be saved.

A maximum of 300 path names can be specified.

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

Additional information about object name patterns is in the Integrated file system topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Note: This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.

Element 1: Name

'*'
The objects in the current directory are saved.
path-name
Specify an object path name or a pattern that can match many names.

Element 2: Include or omit

Specifies whether names that match the pattern should be included or omitted from the operation. Note that in determining whether a name matches a pattern, relative name patterns are always treated as relative to the current working directory.

Note: The SUBTREE parameter determines whether the subtrees are included or omitted.

*INCLUDE
The objects that match the object name pattern are to be saved, unless overridden by an *OMIT specification.
*OMIT
The objects that match the object name pattern are not saved. This overrides an *INCLUDE specification and is intended to be used to omit a subset of a previously selected pattern.

Note: The objects will be restored with the same name.

Name pattern (PATTERN)

Start of change

Specifies one or more object name patterns to be used to subset the objects to be saved. The Objects (OBJ) parameter defines the set of candidate objects. A maximum of 50 values can be specified for this parameter.End of change

Element 1: Pattern

*
All objects which qualify for the operation are included or omitted.
character-value
Specify an object name or a pattern that can match many names.

Element 2: Include or omit

Specifies whether names that match the pattern should be included or omitted from the operation.

Note: The SUBTREE parameter determines whether the subtrees are included or omitted.

*INCLUDE
Only objects which are included by the OBJ parameter and match the PATTERN parameter are included in the save, unless overridden by an *OMIT specification.
*OMIT
Start of change
All objects which are included by the OBJ parameter are included in the save except those objects which match the PATTERN parameter. This overrides an *INCLUDE specification and is intended to be used to omit a subset of a previously selected pattern.End of change
Start of change

Connection type (CNNTYPE)

Specifies the type of connection with the remote system.

*SNA
The remote system is accessed using a Systems Network Architecture (SNA) address and protocol.
*IP
The remote system is accessed using a host name or an internet address over a TCP/IP connection.
*DB2MIRROR
The remote system is accessed using System Object Replication NRG configured by Db2 Mirror GUI or Db2 Mirror services.

Remote port (RMTPORT)

Specifies the port that an application on the remote system is listening on (if it's not the default port for ObjectConnect server).

Note: When CNNTYPE is *DB2MIRROR, do not specify RMTPORT.

*DFT
This default value uses the port configured in TCPIP service table.
1-65534
Specify the port number to be used. This must be the specific port the ObjectConnect server is listening on. Otherwise, the remote host will reject the open attempt.

Remote user ID (RMTUSER)

Specifies the user ID that is sent to the remote system.

Note: When CNNTYPE is *DB2MIRROR, do not specify RMTUSER parameter. The current thread effective user profile will be sent to remote system.

*NONE
No user ID is sent.
*SVRAUT
The user ID stored in the server authentication table (SVRAUT) is sent.

Note: The user profile of the job issuing this command and the RMTLOCNAME are used to obtain the user ID and user password from the SVRAUT table. The user ID and user password are specified in the RMTUSER and RMTPWD are used to authenticate with the ObjectConnect server.

It is required that the QRETSVRSEC system value is set 1 to store the user password and the server name in the SVRAUT table are in upper case.

*CURRENT
The current user of the job using this command is sent.
*KERBEROS
Authentication occurs using Kerberos. The default credentials cache file for the current user is used to locate existing Kerberos ticket-granting tickets. The Add Kerberos Ticket (ADDKRBTKT) command or the Qshell kinit tool can be used to create or refresh expired tickets.

Note: Kerberos needs to be configured on both systems for this authentication type to be used.

name
Specify the name of the user ID. The user ID must exist on the remote system.

Remote password (RMTPWD)

Specifies the password to be sent to the remote system.

Note: When CNNTYPE is *DB2MIRROR, do not specify RMTPWD parameter.

character-value
Specify a password to be sent to the remote system to verify the user ID specified for the RMTUSER parameter.

Note: If specifying *SVRAUT or *KERBEROS in RMTUSER parameter, the RMTPWD parameter is ignored.

End of change

Output (OUTPUT)

Specifies whether information about the saved and restored objects is printed.

*NONE
No output is created.
*PRINT
Information about the saved objects is printed with the spooled output of the job. Information about the restored objects is printed with the spooled output of the job at the remote location.

Directory subtree (SUBTREE)

Specifies whether directory subtrees are included in the save operation.

*ALL
The entire subtree of each directory that matches the object name pattern is included. The subtree includes all subdirectories and the objects within those subdirectories.
*DIR
The objects in the first level of each directory that matches the object name pattern are included. The subdirectories of each matching directory are included, but the objects in the subdirectories are not included.
*NONE
No subtrees are included in the save operation. If a directory matches the object name pattern specified, the objects in the directory are included. If the directory has subdirectories, neither the subdirectories nor the objects in the subdirectories are included.
*OBJ
Only the objects that exactly match the object name pattern will be processed. If the object name pattern specifies a directory, objects in the directory are not included.
*STG
The objects that match the object name pattern are processed along with the storage for related objects. Objects that are saved using this value can only be restored using SUBTREE(*STG).

Rebuild mounted file system (RBDMFS)

Specifies which mounted file systems should be rebuilt during the restore.

Note: You must have save system (*SAVSYS) or all object (*ALLOBJ) special authority to specify a value other than *NONE for this parameter.

*NONE
Mounted file systems will not be rebuilt during the restore. Objects that were saved from a mounted file system will be restored to the file system that contains the directory being restored into.
*UDFS
Mounted user-defined file systems will be rebuilt during the restore. A user-defined file system will be created if it does not exist and then will be mounted over the same directory it was mounted over during the save.

If a user-defined file system is created during the restore, the attributes will be set based on the saved user-defined file system including any user-defined file system specific attributes such as 'Case sensitivity' or 'Default file format'. If the user-defined file system exists before the restore, no attributes will be changed.

If there is an error creating or mounting a user-defined file system, none of the objects that were saved from the mounted user-defined file system will be restored.

Note: If it does not exist before the restore, the directory that is being mounted over will be created with attributes and authorities copied from the directory being restored into. This could cause problems when the user-defined file system is unmounted and then remounted, if the authorities are not sufficient to allow the mount to occur.

Time period for last change (CHGPERIOD)

Specifies a date/time range. Objects that were last changed within that range will be saved.

Element 1: Start date

*ALL
No starting date is specified. All objects last changed prior to the ending date will be saved.
*LASTSAVE
The objects that have changed since the last time they were saved with UPDHST(*YES) specified are saved. Notes:
  1. If this value is specified, the value *ALL must be specified for all other elements of this parameter.
  2. For local file systems, the system archive attribute is used. For remote file systems, the PC archive attribute is used.
date
Specify the date after which objects that have changed are to be saved. The date must be specified in job date format.

Element 2: Start time

*ALL
All times of day are included in the range.
time
Specify the time on the start date after which objects that have changed are to be saved.

The time is specified in 24-hour format with or without a time separator as follows:

Note: Specifying an explicit time is valid only if the starting date is an explicit date.

Element 3: End date

*ALL
No ending date is specified. All objects changed since the starting date will be saved.
date
Specify the date before which objects that have changed are to be saved. The date must be specified in the job date format.

Element 4: End time

*ALL
All times of day are included in the range.
time
Specify a time on the end date before which objects that have changed are to be saved.

The time is specified in 24-hour format with or without a time separator as follows:

Note: Specifying an explicit time is valid only if the ending date is an explicit date.

Target release (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, V5R3M0 is version 5, release 3, modification 0.

Valid values depend on the current version, release, and modification level of the operating system, and they change with each new release. You can press F4 while prompting this command parameter to see a list of valid target release 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.
character-value
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.

Object pre-check (PRECHK)

Specifies whether the save operation ends if any of the selected objects cannot be saved.

*NO
The save operation does not end. Objects that can be saved are saved.
*YES
The save operation ends. Nothing is saved unless all of the selected objects can be saved.

Save active (SAVACT)

Specifies whether an object can be updated while it is being saved.

Note: If your system is in a restricted state, this parameter is ignored and the save operation is performed as if SAVACT(*NO) was specified.

*NO
Objects that are in use are not saved. Objects cannot be updated while being saved.
*YES
Objects can be saved and used at the same time. The object checkpoints can occur at different times.
*SYNC
Objects can be saved and used at the same time. All of the object checkpoints occur at the same time.

Save active message queue (SAVACTMSGQ)

Specifies the message queue that the save operation uses to notify the user that the checkpoint processing is complete.

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

Note: This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.

*NONE
No notification message is sent.
*WRKSTN
The notification message is sent to the work station message queue.
path-name
Specify the path name of the message queue to be used.

ASP device (ASPDEV)

Specifies the auxiliary storage pool (ASP) device to be included in the save operation.

*DFT
The operation uses the ASPDEV value appropriate for the file system from which objects are being saved. For Integrated File System objects, *ALLAVL is used. For objects from the QSYS file system, the corresponding save command ASPDEV default is used.
*ALLAVL
The operation includes the system ASP (ASP number 1), all basic user ASPs (ASP numbers 2-32), and all available independent ASPs.
*
The operation includes the system ASP, all basic user ASPs, and, if the current thread has an ASP group, all independent ASPs in the ASP group.
*SYSBAS
The system ASP and all basic user ASPs are included in the save operation.
*CURASPGRP
If the current thread has an ASP group, all independent ASPs in the ASP group are included in the save operation.
name
Specify the name of the ASP device to be included in the save operation.

Option (OPTION)

Specifies whether to restore objects that already exist on the system or objects that do not already exist on the system.

*ALL
All of the specified objects are restored, whether they already exist on the system or not.
*NEW
Objects are restored only if they do not already exist on the system.
*OLD
Objects are restored only if they already exist on the system.

Allow object differences (ALWOBJDIF)

Specifies whether differences are allowed between the saved objects and the restored objects.

Notes:

  1. You must have all object (*ALLOBJ) special authority to specify any value other than *NONE for this parameter.
  2. If differences are found, the final message for the restore operation is an escape message rather than the normal completion message.

The types of differences include:

Single values

*NONE
None of the differences listed above are allowed on the restore operation. See the description of each individual value to determine how differences are handled.
*ALL
All of the differences listed above are allowed on the restore operation. See the description of each individual value to determine how differences are handled.

Other values (up to 3 repetitions)

*AUTL
Authorization list differences are allowed. If the saved object had an authorization list and the object exists on the system but does not have the same authorization list, the object is restored with the authorization list of the existing object. If the saved object had an authorization list and the object does not exist and it is being restored to a different system than the save system, the object is restored and it is linked to the authorization list. If the authorization list does not exist, the public authority is set to *EXCLUDE.

If this value is not specified, authorization list differences are not allowed. If the saved object had an authorization list and the object exists on the system but does not have the same authorization list, the object is not restored. If the saved object had an authorization list and the object does not exist and it is being restored to a different system than the save system, the object is restored, but it is not linked to the authorization list, and the public authority is set to *EXCLUDE.

*OWNER
Ownership differences are allowed. If an object already exists on the system with a different owner than the saved object, the object is restored with the owner of the object on the system.

If this value is not specified, ownership differences are not allowed. If an object already exists on the system with a different owner than the saved object, the object is not restored.

*PGP
Primary group differences are allowed. If an object already exists on the system with a different primary group than the saved object, the object is restored with the primary group of the object on the system.

If this value is not specified, primary group differences are not allowed. If an object already exists on the system with a different primary group than the saved object, the object is not restored.

Force object conversion (FRCOBJCVN)

Specifies whether to convert user objects to the format required for use in the current version of the operating system, or to be compatible with the current machine, when the objects are restored.

Notes:

  1. This parameter applies only to user objects of the *MODULE, *PGM, *SRVPGM, and *SQLPKG object types.
  2. An object must have creation data (either observable or unobservable) to be converted.
  3. If an object needs to be converted (because it is formatted for an earlier version of the operating system or is incompatible with the current machine), but is not converted during this restore operation, the object is automatically converted the first time it is used.

Single values

*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 QFRCCVNRST system value must have a value of either "0" or "1".

Element 1: Convert during restore

*YES
The objects are converted during the restore operation.

Notes:

  1. 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 specfied, then QFRCCVNRST can have any valid value and FRCOBJCVN(*YES *ALL) overrides the QFRCCVNRST system value.
  2. Specifying this value increases the time of the restore operation, but avoids the need to convert the objects when they are first used.

Element 2: Objects to convert

*RQD
The objects are converted only if they require conversion to be used by the current operating system or to be compatible with the current machine. If the objects do not have all creation data (either observable or unobservable), the objects cannot be converted and will not be restored.
*ALL
All objects are converted regardless of their current format and machine compatibility, including compatible objects already in the current format. However, if the objects do not have all creation data (either observable or unobservable), the objects cannot be converted and will not be restored.

Scan objects (SCAN)

Specifies whether objects will be scanned while being saved when exit programs are registered with any of the integrated file system scan-related exit points and whether objects that previously failed a scan should be saved.

The integrated file system scan-related exit points are:

For details on these exit points, see the APIs topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Element 1: Scan during save

*NO
Objects will not be scanned by the scan-related exit programs.
*YES
Objects will be scanned according to the rules described in the scan-related exit programs.

Element 2: Save failed objects

*NOSAVFAILED
Objects that have either previously failed a scan or that fail a scan by a QIBM_QP0L_SCAN_OPEN exit program during this save will not be saved.
*SAVFAILED
Objects that have either previously failed a scan or that fail a scan during this save will be saved.

Private authorities (PVTAUT)

Specifies whether to save and restore private authorities with the objects that are saved and restored.

*NO
No private authorities are saved or restored.
*YES
Private authorities are saved and restored with the objects.

Note: You must have save system (*SAVSYS) or all object (*ALLOBJ) special authority on the system from which objects are being saved, and *ALLOBJ special authority on the restore system, to specify this value.

Create parent directories (CRTPRNDIR)

Specifies whether parent directories of objects being restored should be created if they do not exist. For example, if object '/a/b/c/file1' is being restored then directories '/a', '/a/b' and '/a/b/c' must exist. This parameter only applies to "root" (/), QOpenSys and user-defined file systems, and will be ignored for all other file systems.

*NO
Parent directories will not be created if they do not exist. Diagnostic message CPD375B will be sent and the object will not be restored.
*YES
The restore will create parent directories if they do not exist. The directories created by the restore will have *EXCLUDE public authority and will be owned by the user profile specified for the Parent directory owner (PRNDIROWN) parameter. The other parent directory attributes will be set using the shipped default values for the Create Directory (CRTDIR) command parameters.

Parent directory owner (PRNDIROWN)

Specifies the name of an existing user profile that will own parent directories created by the restore. This parameter only applies to "root" (/), QOpenSys and user-defined file systems, and will be ignored for all other file systems.

Note: If a value is specified for this parameter, *YES must be specified for the Create parent directories (CRTPRNDIR) parameter.

*PARENT
The owner of a parent directory being created by the restore will be the same as the owner of the directory it is being created into. For example, if object '/a/b/c/file1' is being restored and directory '/a' exists but the '/b' and '/b/c' directories do not exist, the '/b' and '/b/c' directories are created with the same owner as the '/a' directory.
name
Specify the name of a user profile to be the owner of any parent directories that are created by the restore.

Start journaling (STRJRN)

Specifies whether to start journaling for new objects that are restored.

Notes:

  1. Journal information that was saved will be restored for new objects whether journaling is started or not.
  2. Journaling will not be changed for existing objects.
*YES
Journaling will be started for new objects that were being journaled when they were saved.
*NO
Journaling will not be started for the objects that are restored.
Start of changeEnd of change

Examples

Start of change

Example 1: Saving and Restoring a Directory using *IP with *SVRAUTEnd of change

Start of changeSAVRST   CNNTYPE(*IP) RMTLOCNAME(SYSTEM2) RMTUSER(*SVRAUT)
         OBJ(('MYDIR')) SAVACT(*YES)
         SAVACTMSGQ('/QSYS.LIB/SVRTEST.LIB/ZXC.MSGQ')

This command saves the MYDIR directory while active, uses the ZXC message queue in library SVRTEST to save messages and restores the MYDIR directory to remote system SYSTEM2 using connection type *IP with valid user profile and password on the system SYSTEM2 which are retrieved from SVRAUT table using current user profile and server name SYSTEM2.

Example 2: Saving and Restoring a Member Object using *IP with user profile and password

SAVRST   CNNTYPE(*IP) RMTLOCNAME(SYSTEM1)End of change
         RMTUSER(USRPRF1) RMTPWD(MYPASSWORD)
         OBJ(('/QSYS.LIB/JTEMP.LIB/ZXC.FILE/QYYCPDGT.MBR'))

Start of change

This command saves the QYYCPDGT member from file ZXC in library JTEMP and restores the object on the iSeries system at remote location SYSTEM1 using connection type *IP with valid user profile USRPRF1 and password MYPASSWORD on system SYSTEM1.End of change

Start of change

Example 3: Saving and Restoring a Directory using *IP with KerberosEnd of change

SAVRST   CNNTYPE(*IP) RMTLOCNAME(SYSTEM2) RMTUSER(*KERBEROS)
         OBJ(('MYDIR')) SAVACT(*YES)
         SAVACTMSGQ('/QSYS.LIB/SVRTEST.LIB/ZXC.MSGQ')

Start of change

This command saves the MYDIR directory while active, uses the ZXC message queue in library SVRTEST to save messages and restores the MYDIR directory to remote system SYSTEM2 using connection type *IP and Kerberos ticket-granting tickets in default credentials cache file.End of change

Start of change

Example 4: Saving and Restoring a Directory using *DB2MIRROREnd of change

SAVRST   CNNTYPE(*DB2MIRROR) OBJ(('/MYDIR'))

This command saves the /MYDIR directory and restores the /MYDIR directory to the mirrored system using connection type *DB2MIRROR.

Example 5: Saving and Restoring a Member Object using *SNA

SAVRST   RMTLOCNAME(SYSTEM1)
         OBJ(('/QSYS.LIB/JTEMP.LIB/ZXC.FILE/QYYCPDGT.MBR'))

Start of change

This command saves the QYYCPDGT member from file ZXC in library JTEMP and restores the object on the iSeries system at remote location SYSTEM1 using connection type *SNA.End of change

Start of change

Example 6: Saving and Restoring a Directory using *SNAEnd of change

SAVRST   RMTLOCNAME(SYSTEM2) OBJ(('MYDIR')) SAVACT(*YES)
         SAVACTMSGQ('/QSYS.LIB/SVRTEST.LIB/ZXC.MSGQ')

Start of change

This command saves the MYDIR directory while active, uses the ZXC message queue in library SVRTEST to save messages and restores the MYDIR directory to remote system SYSTEM2 using connection type *SNA.End of change

Start of changeEnd of change

Error messages

*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 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 ended, function code &1, return code &2. Start of change
CPDCB0A
Error occurred during the
Error occurred during the &1 operation.amp;1 operation.End of change