Top
Enterprise Postgres 17 Operation Guide

16.4.1 Copy Command for Backup

Feature

User exit (for the copy command) called from the pgx_dmpall command.

Format

The syntax for calling the copy command from the pgx_dmpall command is described below.

If the operation mode is "prepare"
copyCommandName prepare 'pathOfBackupInfoFile' 'pathOfBackupTargetListFile'
If the operation mode is "backup"
copyCommandName backup
If the operation mode is "finalize"
copyCommandName finalize 'pathOfBackupInfoFile'

Argument

The number of arguments vary depending on operation mode. The argument of each operation mode is as follows.

Operation mode

First argument

Second argument

Third argument

prepare

Operation mode

Backup information file path name

Backup target list file path name

backup

None

None

finalize

Backup information file path name

Additionally, the access permissions for the backup information file and backup target list file are different depending on the operation mode. The access permissions of each operation mode are as follows.

Operation mode

Backup information file

Backup target list file

prepare

Can be viewed by the instance administrator only

Can be viewed by the instance administrator only

backup

-

-

finalize

Can be viewed and updated by the instance administrator only

-

Return value

Return value

Description

0

Normal end

The pgx_dmpall command continues processing.

Other than 0

Abnormal end

The pgx_dmpall command terminates in error.

Description

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_dmpall command was executed.

  • If the copy command becomes unresponsive, the pgx_dmpall command will also become unresponsive. If 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.

  • For prepare mode only, it is possible to use the PostgreSQL client application to access the database using the copy command. For all other modes, do not execute Fujitsu Enterprise Postgres commands or PostgreSQL applications.

  • Enable the fsync parameter in postgresql.conf, because data on the shared memory buffer needs to have been already written to disk when backup starts.