6.4.6 Example 6 (Backing up RDAREAs)

Specified RDAREAs (rdarea01 and rdarea02) are backed up during HiRDB operation.

Organization of this subsection
(1) Using the pdhold -c command to place the RDAREAs to be backed up in shutdown and closed status
(2) Using the pdlogswap command to swap the system log files at the server that contains the RDAREAs to be backed up
(3) Using the pdcopy command to back up specified RDAREAs
(4) Using the pdrels -o command to release shutdown and open RDAREAs

(1) Using the pdhold -c command to place the RDAREAs to be backed up in shutdown and closed status

This operation is necessary when x (referencing/updating-impossible) is specified as the backup acquisition mode; it is not necessary when r (referencing-permitted mode) or s (updatable mode) is specified as the backup acquisition mode.

pdhold -r rdarea01,rdarea02 -c

(2) Using the pdlogswap command to swap the system log files at the server that contains the RDAREAs to be backed up

System log files are swapped in order to physically separate the system logs needed for database restoration. To restore the RDAREAs from the backup copy to be created in step (3), the system log information collected subsequently (the system log information in the file to be used as the current file after swapping) will be used as input information.

pdlogswap -d sys -s bes1 -w

(3) Using the pdcopy command to back up specified RDAREAs

pdcopy -m /rdarea/mast/mast01 -M x -r rdarea01,rdarea02
-b /pdcopy/backup01 -p /pdcopy01

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the referencing/updating-impossible mode as the backup acquisition mode.
-r: Specifies the RDAREAs (rdarea01 and rdarea02) that are to be backed up.
-b: Specifies the name of the backup file.
-p: Specifies the output file name for the pdcopy command's processing results listing.
Remarks
When the automatic log unloading facility is being used, execute the pdlogatul command to record the unload log file name that corresponds to the current system log file when backup is being made.

(4) Using the pdrels -o command to release shutdown and open RDAREAs

This operation is necessary when x (referencing/updating-impossible) is specified as the backup acquisition mode; it is not necessary when r (referencing-permitted mode) or s (updatable mode) is specified as the backup acquisition mode.

pdrels -r rdarea01,rdarea02 -o

It is recommended that after the command has executed you check whether or not the execution results are correct. For details on how to check command execution results, see the manual HiRDB Version 8 Command Reference.