To perform recovery using the copy command, in addition to performing the standard recovery procedure, it is also necessary to create a copy command, and then execute the pgx_rcvall command specifying it. This section describes the procedure specific to using the copy command.
Determining the backup area of the latest backup
Check the backup information file to determine the backup area used for the latest backup, and confirm that it is in a recoverable state.
Execute the pgx_rcvall command with the --view-results-of-copying option to output the content of the backup information file.
Example
$ pgx_rcvall -D /database/inst1 --view-results-of-copying
Execute the pgx_rcvall command with the -Y option specifying the full path of the copy command for recovery created in step 3 of the preparation for backup described in "16.2 Backup Using the Copy Command".
The example below recover only some tablespaces, but not the database cluster, using the copy command.
Example
$ pgx_rcvall -D /database/inst1 -B /backup/inst1 -Y '/database/command/recovery.sh'
Point
If the latest backup was performed using the copy command, the pgx_rcvall command automatically recognizes which database resources were backed up using the copy command, or whether resources were backed up to the backup data storage destination. Therefore, recovery can be performed by simply executing the pgx_rcvall command specifying the copy command for recovery.
See
Refer to "pgx_rcvall" in the Reference for information on the command.