Restore (RST) command support
The RST command can be used to select a volume or volumes to restore.
The RST command protocol requires that all physical file systems adhere to a certain set of predefined rules governing how restoring is handled, depending on whether or not the object exists on the system. For purposes of restoring an optical volume image, the target media must exist on the system, either mounted in a stand-alone device or imported into an optical media library. Also, it must be accessible by the name specified on the OBJ-New Path Name parameter. The OBJ-New Path Name must either match the name of the OBJ-Name parameter or be *SAME. This restriction will require that unformatted volumes be renamed before processing the RST command. Unformatted volumes can be renamed using option 7 from either the WRKOPTOL, WRKLNK display or by issuing the generic RNM command.
When an unformatted volume is renamed, the new name acts as an alias to the unformatted volume. The new name will not be written to the media and will not be preserved if the volume is removed from the device. The name is only a temporary volume identifier used to refer to this volume until the volume is restored.
Saved volumes can be restored to both unformatted and formatted volumes. If restoring to a formatted volume that contains active files and directories, an inquiry message is sent. If you proceed with the restore, all data on the target media will be lost.
Saved High Performance Optical File System (HPOFS) volumes can be restored to erasable media with matching sector sizes and a capacity equal to or greater than the saved volume.
Saved Universal Disk Format (UDF) volumes on DVD and erasable media can be restored onto DVD or erasable media, but media capacity and sector size must be identical to the saved volume.
WORM volumes can be restored to either WORM or Erasable media as long as the capacity of the target media is greater than or equal to the saved volume capacity and the sector size is identical to the saved volume. When restoring to WORM, the target volume must be unformatted.
The performance of the RST command is comparable to the DUPOPT command, although it depends on the target device chosen.
Parameters
- OBJ name
- The name of the optical volume image or images to be restored from a save/restore device.
- OBJ New path name
- Specify a single or multiple path names. The path name cannot be extended beyond the volume level. Examples of invalid path names include, ’/QOPT/VOL/*’ or ’/QOPT/VOL/DIR/FILE’. Specify the names of existing volumes or *SAME.
- SUBTREE
- This must be *STG when restoring optical volume images.
- OPTION
- This must be *ALL or *OLD.
- ALOWOBJDIF
- Select *OWNER, *PGP, *AUTL, *NONE, *ALL. The selected value determines what differences will be tolerated between the saved volume and the formatted target volume. If changes are allowed, an attempt will made to preserve the security attributes UID, GID and PERMS of a the UDF target volume root directory. The *OWNER and *PGP values are not checked when restoring to an uninitialized volume or when restoring to an initialized HPOFS volume.
Examples
- Restore all volumes within the QOPT file system from a save file.
RST DEV(’/qsys.lib/xzylib.lib/xzysavefile.file’) OBJ((* *INCLUDE *SAME)) SUBTREE(*STG)
- Restore all volumes beginning with vola and volb from a save file.
RST DEV(’/qsys.lib/xzylib.lib/xzysavefile.file’) + OBJ((’/qopt/vola*’ *INCLUDE *same) (’/qopt/volb*’ *INCLUDE *same)) SUBTREE(*STG)
- Restore one volume, vol1 to vol1.
RST DEV(’/qsys.lib/tap01.devd’) OBJ((’/qopt/vol1’ *INCLUDE *same)) SUBTREE(*STG)
The OBJ-New Path Name must either match the name of the OBJ-Name parameter or be *SAME. This restriction will require that unformatted volumes be renamed prior to processing the RST command.
Parent topic:
Save and restore commands