Using the Copy Optical (CPYOPT) command to back up a volume
You can use the Copy Optical (CPYOPT) command to make 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.
- Copy completely or partially. You can copy a file, a directory, a directory with all of its subdirectories, or an entire volume.
- Copy incrementally. You can copy only what has changed since the previous CPYOPT request.
- Copy by specifying a starting date for selecting files. Only files that are created or changed on or after the specified date are eligible for copying.
- Replicate the hierarchical structure of the source volume on the target volume.
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 volume, 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 volume.
- The creation date and time and change date and time of the file on the target volume will be different from 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 volume directly. You do not have to copy applications back to a 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 change files on your source volume but only create new ones.
Parent topic:
Copy Optical (CPYOPT) command
Copy Optical CPYOPT requirements to volume type *BACKUP
When the target volume is type *BACKUP, the CPYOPT command has the following unique requirements:
- The source volume must be type *PRIMARY.
- Only the CPYOPT and Convert Optical Backup (CVTOPTBKU) commands can write to the target backup volume. APIs, utilities, and user programs cannot write to an optical backup volume.
- An optical back up 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 creation date and time and the 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, copy the file or directory to an optical primary volume by using the CPYOPT command.
- 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 CVTOPTBKU 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 volume type to use with the CPYOPT command
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, using the CPYOPT command type *PRIMARY volume gives you more flexibility, but it requires more management of your backup volumes.
- The CPYOPT command for 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 copies directories and volumes and the success status of those copies.
- The biggest advantage of using the CPYOPT command for 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 useful if you ever need to recover the lost source data 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 three times the sector size for each directory. Therefore, if the CPYOPT command copies 100 directories from a primary volume to a backup volume where the sector size on the backup volume is 2 KB, the backup volume uses an additional 600 KB of space. In this example 600 KB of space is used every time the command is run.