Using CPYOPT to Backup a volume

You can use the Copy Optical (CPYOPT) command to do a complete or partial copy of your volume.

The following describes the special processing of the CPYOPT command when the target is a *PRIMARY or *BACKUP volume. Refer to the following list to decide how to best use the command.

CPYOPT requirements to volume type *PRIMARY

When the target volume is type *PRIMARY, the CPYOPT command has the following unique requirements:
  • The source volume can be either type *PRIMARY or *BACKUP.
  • Because the target volume is *PRIMARY, all API requests and most optical commands and utilities can access the volume.
  • Because utilities and user programs can update the *PRIMARY volume, you need to determine how to protect directories and files from unauthorized change or deletion.
  • The target volume could contain information for one or multiple optical *PRIMARY volumes. An easy way to manage multiple volumes on a single target volume would be to have a new first level directory. That directory name could be the name of the source-primary volume.
  • You need a way of keeping track of when a volume or directory was last backed up. Use the CPYOPT command to do it automatically.
  • The hierarchical structure on the target volume does not need to be identical to that of the optical *PRIMARY volume.
  • The create date and time, and change date and time, of the file on the target volume will be different than their counterparts on the optical primary volume. The file creation data and time on the target volume is the date that the file was written.
  • You can use directories and files on the target *PRIMARY volume directly. You do not have to copy applications back to a *PRIMARY optical volume.
  • You can request that the system copy only new files on the source volume to the target volume. This might be useful if you never changes files on your source volume but only create new ones.

CPYOPT requirements to volume type *BACKUP

When the target volume is type *BACKUP, the Copy Optical (CPYOPT) command has the following unique requirements:
  • The source volume must be type *PRIMARY.
  • Only the CPYOPT and CVTOPTBKU commands can write to the target *BACKUP volume. APIs, utilities, and user programs cannot write to an optical *BACKUP volume.
  • An optical *BACKUP volume can contain information for only one optical *PRIMARY volume. This prevents two primary volumes from sharing the same optical backup volume.
  • You cannot delete directories or files from an optical *BACKUP volume. This ensures data integrity of the optical backup volume.
  • The system maintains the file create date and time, and change date and time for the *PRIMARY volume on the optical *BACKUP volume.
  • A user application cannot directly use a file or directory on a *BACKUP volume. First, you must copy the file or directory to an optical *PRIMARY volume by using CPYOPT.
  • If the optical *PRIMARY volume is damaged or lost, you can convert the optical *BACKUP volume to an optical *PRIMARY volume. You can do this by using the Convert Optical Backup (CVTOPTBKU) CL command.
  • To maintain control information about the status of backup requests, optical *BACKUP volumes require additional media usage. Because of this, a *PRIMARY volume that is 100% used may not fit on an optical *BACKUP volume.
  • The system always initializes *BACKUP volumes with a 99% volume threshold.

Suggestions on which CPYOPT volume type to use

Here is a list of items that you can use to determine if you should use a target volume type of *PRIMARY or *BACKUP.
  • In general, the CPYOPT to a type *PRIMARY volume gives you more flexibility, but it requires more management of your backup volumes.
  • The CPYOPT to a type *BACKUP volume provides more management and security for your optical backup volumes, but it is less flexible.
  • Use the CPYOPT command, and specify a type *PRIMARY volume, if you want to copy data from several volumes to a single volume.
  • Use the CPYOPT command, and specify a type *BACKUP volume, if you want better security for your backup volumes. The system cannot write volumes with type *BACKUP to with normal optical commands or user programs.
  • Use the CPYOPT command and specify a type *BACKUP volume to save information such as when the system copied directories and volumes, and the success status of those copies.
  • The biggest advantage of using the CPYOPT to a type *BACKUP volume is that the system stores the backup control information on the backup volume. This information includes the relationship between files on the backup volume and the files on the primary volume. This information can be very useful if you ever need to recover the lost source data is from the backup volume.
  • Use the CPYOPT command, and specify a type *BACKUP volume, if you want the source and target file dates (creation and change) to be identical.
  • One disadvantage in using the CPYOPT command to a type *BACKUP volume is that the system uses extra space on the backup volume to store control information. The amount that is used is approximately 3 times the sector size for each directory. Therefore, if CPYOPT copies 100 directories from a primary volume to a backup volume where the sector size on the backup volume is 2KB, the backup volume uses an additional 600KB of space. In this example 600KB of space is used every time the command is run.