Feature
User exit (for the copy command) called from the pgx_rcvall command.
Format
The syntax for calling the copy command from the pgx_rcvall command is described below.
copyCommandName restore 'pathOfBackupInfoFile' 'pathOfBackupTargetListFile'
Argument
Operation mode
Mode | Description |
---|---|
restore | Performs restore. |
Full path of the backup information file
Full path of the backup information file, enclosed in single quotation marks.
Full path of the backup target list file
Full path of the file containing the resources to be restored using the copy command, enclosed in single quotation marks.
The access permissions for the backup information file and backup target list file are as below.
Backup information file | Backup target list file |
---|---|
Can be viewed by the instance administrator only | Can be viewed by the instance administrator only |
Return value
Return value | Description |
---|---|
0 | Normal end The pgx_rcvall command continues processing. |
Other than 0 | Abnormal end The pgx_rcvall command terminates in error. |
Description
The copy command operates with the privileges of the operating system user who executed the pgx_rcvall command. Therefore, grant copy command execution privileges to users who will execute the pgx_rcvall command. Additionally, have the copy command change users as necessary.
The copy command is called once only in restore mode.
To copy multiple resources simultaneously, have the copy command copy them in parallel.
Note
The backup information file and backup target list file cannot be deleted. Additionally, the privileges cannot be changed.
Standard output and standard error output of the copy command are output to the terminal where the pgx_rcvall command was executed.
If the copy command becomes unresponsive, the pgx_rcvall command will also become unresponsive. If the status of the copy command is deemed to be unresponsive by the operating system, use an operating system command to forcibly stop it.
Output the copy command execution trace and the result to a temporary file, so that if it terminates in error, the cause can be investigated at a later time.
Do not execute Fujitsu Enterprise Postgres commands or PostgreSQL applications in the copy command.
There may be files and directories not required for recovery using the archive log included in the backup, such as postmaster.pid, pg_wal/subdirectory and pg_replslot in the database cluster. If such unnecessary files and directories exist, have the copy command delete them after the restore.