What happens when you restore objects

When you restore an object, the system takes different actions depending on several conditions.

An object on this system is like a container. The object has information about the container itself, such as the owner of the object and the last time it was saved. This is the information you see when you display the object description (DSPOBJD command). The object also has contents, such as the records in a database file or the instructions in a program.

When you restore an object, the system takes different actions depending on the following conditions:

With a few exceptions that relate to security, the contents of the object are always restored. If the object exists, the system compares the object description information about the system copy and the media copy and then makes decisions. For most information, the media version of the information is restored. For security-relevant information, such as the public authority and the object owner, the system version is left unchanged. In a few cases, such as the size of the object and the date it was restored, the system determines a value when the object is restored.

The allow object differences (ALWOBJDIF) parameter on the restore commands is primarily for security protection and integrity protection. For example, if system security is important to you, you might want to take special action if someone attempts to restore an object whose owner has been changed. Or, if the member information about a database file does not match, you might have problems with the integrity of your data. You can use the ALWOBJDIF parameter to prevent this.

Start of changeThe default value for the ALWOBJDIF parameter is *NONE. This means that if important differences exist between the media version and the system version of an object, you want the system to notify you and not restore any differences. Normally, you should use the default value. However, when you are restoring your information to a different system or logical partition, such as during a disaster recovery, you should specify ALWOBJDIF(*COMPATIBLE) which allows differences that are compatible with existing database files.End of change

You can specify a combination of up to four values on the ALWOBJDIF parameter to allow specific types of differences for the restore operation: *FILELVL, *AUTL, *OWNER, and *PGP. The *FILELVL value attempts to restore physical file data when the file level ID or the member level ID of the physical file on the system is different from that of the physical file on the save media. The *AUTL value allows differences in authorization lists. The *OWNER value allows differences in object ownership. The *PGP value allows differences in the primary group.

Table 1 shows examples of the effect of the ALWOBJDIF parameter.

Table 1. Restoring objects with ALWOBJDIF. Effect of ALWOBJDIF parameter when the value on the media and on the system are different.
Object characteristic that differs Value for object after restore operation
ALWOBJDIF(*NONE) specified ALWOBJDIF(*ALL) specified Start of changeALWOBJDIF(*COMPATIBLE) specifiedEnd of change
Object owner Object is not restored Existing value1 Start of changeExisting value1End of change
Object primary group Object is not restored Existing value3 Start of changeExisting value3End of change
Object auditing Existing value Existing value Existing value
Authorization list, restore over existing object:  
Object on media is secured by an authorization list and object on system is not secured by an authorization list Object is not restored Object is restored and is secured by authorization list of object on system2 Start of changeObject is restored and is secured by authorization list of object on system2End of change
Object on media is not secured by an authorization list and object on system is secured by an authorization list Object is restored and is secured by authorization list of object on system Object is restored and is secured by authorization list of object on system2 Start of changeObject is restored and is secured by authorization list of object on system2End of change
Object on media is secured by an authorization list and object on system is secured by a different authorization list Object is not restored Object is restored and is secured by authorization list of object on system; message is sent to user2 Start of changeObject is restored and is secured by authorization list of object on system; message is sent to user2End of change
Authorization list, new object restored:  
Object is restored onto different system or logical partition than it was saved from Object is restored and is not secured by an authorization list Object is restored and is secured by the same authorization list that secured the object when it was saved, if the authorization list exists2 Start of changeObject is restored and is secured by the same authorization list that secured the object when it was saved, if the authorization list exists2End of change
Database files:      
Creation date for file File is not restored File is renamed on the system; copy is restored from media with media creation date; message is sent to user. Logical file is not restored. System attempts to restore physical file data4
Creation date for member Member is not restored Member is renamed on the system; copy is restored from media with media creation date; message is sent to user. Logical member is not restored. System attempts to restore physical member data4
Physical file data:  
Level identifier for file Physical file data is not restored File is renamed on the system; copy is restored from media with media creation date; message is sent to user. System attempts to restore physical file data4
Level identifier for member Physical file data is not restored Member is renamed on the system; copy is restored from media with media creation date; message is sent to user. System attempts to restore physical member data4
1
Also applies to restore commands with ALWOBJDIF(*OWNER)
2
Also applies to restore commands with ALWOBJDIF(*AUTL)
3
Also applies to restore commands with ALWOBJDIF(*PGP)
Start of change4End of change
Also applies to RSTLIB and RSTOBJ commands with ALWOBJDIF(*FILELVL)