Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

21.4.2 Example 2: Recover to the most recent synchronization point

This example recovers user RDAREAs (rdarea01 and rdarea02) to the most recent synchronization point before an error occurred; it is assumed that the system log is being unloaded.

In addition to these RDAREAs, you must also recover all related RDAREAs at the same time. For details about the related RDAREAs, see 6.3 RDAREAs to be backed up together.

Organization of this subsection
(1) Identify the RDAREAs related to the RDAREAs to be recovered
(2) Use the pdclose command to close RDAREAs in error shutdown status
(3) Use the pdlogls command to check for the current system log file
(4) Use the pdlogswap command to swap system log files
(5) Use the pdlogunld command to unload what was the current system log file
(6) Use the pdrstr command to recover RDAREAs to the most recent synchronization
(7) Use the pdcopy command to back up recovered RDAREAs
(8) Use the pdrels command to open recovered RDAREAs by releasing their error shutdown status

(1) Identify the RDAREAs related to the RDAREAs to be recovered

Perform this operation only on user RDAREAs and user LOB RDAREAs (the original RDAREAs of user RDAREAs and the original RDAREAs of user LOB RDAREAs if the inner replica facility is used). If a row-partitioned table is defined, execute the pdrdrefls command with the -t option to identify the RDAREAs comprising the row-partitioned table.

If you need to recover more RDAREAs than the following example shows, add their names following the -r option.

 
pdrdrefls -k chk -e org -c ref
-r rdarea01,rdarea02
 

(2) Use the pdclose command to close RDAREAs in error shutdown status

 
pdclose -r rdarea01,rdarea02
 

(3) Use the pdlogls command to check for the current system log file

In the case of a HiRDB parallel server configuration, check the system log files at the back-end servers at which rdarea01 and rdarea02 are located.

 
pdlogls -d sys
 

(4) Use the pdlogswap command to swap system log files

In order to unload the contents of the current file, the system log files are swapped. In the case of a HiRDB parallel server configuration, swap the system log files at the back-end servers at which rdarea01 and rdarea02 are located.

 
pdlogswap -d sys
 

(5) Use the pdlogunld command to unload what was the current system log file

Unload the contents of the current file identified in step (3). In the case of a HiRDB parallel server configuration, unload the contents of the current system log files at the back-end servers at which rdarea01 and rdarea02 are located.

 
pdlogunld -d sys -g log01 -o /unld/unldlog02
 

(6) Use the pdrstr command to recover RDAREAs to the most recent synchronization

 
pdrstr -m /rdarea/mast/mast01 -g backupg1 -K /pdcopy/admfile
-l /unld/unldlog01 -w /tmp/sortwork -r rdarea01,rdarea02
 

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-g: Specifies the name of a differential backup group.
-K: Specifies the name of a HiRDB file system area for storing the differential backup management file.
-l: Specifies the name of the unload log file.
-w: Specifies the name of the work directory for sorting.
-r: Specifies the names of the RDAREAs (rdarea01 and rdarea02) that are to be recovered.

(7) Use the pdcopy command to back up recovered RDAREAs

 
pdcopy -m /rdarea/mast/mast01 -M r -r rdarea01,rdarea02,...
-g backupg1(S) -b /pdcopy/backup01 -d a -K /pdcopy/admfile -L 5
-o /pdcopy/rfile
 

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.
-r: Specifies the RDAREAs that are to be backed up.
The RDAREA group specified here becomes the differential backup group. The RDAREAs to be backed up cannot be changed in the middle.
-g: Specifies the name of the differential backup group.
For a full backup, specify (S) with the differential backup group name. The differential backup group name specified here must be specified when a differential backup is made subsequently.
-b: Specifies a name for the backup file (full backup file name).
-d: Specifies a backup type:
a: Full backup
b: Accumulation-differential backup since the last full backup
c: Accumulation-differential backup since either the last accumulation-differential backup or the last full backup
d: Differential backup
For details on an accumulation-differential backup, see 6.5.4 Creating an accumulation-differential backup.
-K: Specifies the name of the HiRDB file system area for storing the differential backup management file.
-L: Specifies the size (in megabytes) of the differential backup management file.
-o: Specifies the name of the history file for differential backups.
For details about making backups, see 6. Backup Procedures.

(8) Use the pdrels command to open recovered RDAREAs by releasing their error shutdown status

 
pdrels -r rdarea01,rdarea02 -o