6.4.4 Example 4 (backing up a unit)

All RDAREAs in a unit are backed up during operation of a HiRDB/Parallel Server.

Organization of this subsection
(1) Using the pdlogswap command to swap the system log files in the unit
(2) Using the pdcopy command to back up the entire unit

(1) Using the pdlogswap command to swap the system log files in the unit

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

pdlogswap -d sys -s bes1 -w
pdlogswap -d sys -s bes2 -w

(2) Using the pdcopy command to back up the entire unit

pdcopy -m /rdarea/mast/mast01 -M r -u UNT1 -b /pdcopy/backup01
-p /pdcopy/list01

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the referencing-permitted mode as the backup acquisition mode.
-u: Specifies that all RDAREAs under the unit (UNT1) 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.
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.