Name
pgx_dmpall - Backs up the data directory, tablespaces, and configuration files.
Synopsis
pgx_dmpall [option...]
Description
The pgx_dmpall command backs up the data directory, tablespaces, and configuration files. The backup data is stored in the directory specified by backup_destination parameter of postgresql.conf. pgx_dmpall command also deletes archived Write Ahead Logs (WAL) that are no longer necessary for recovery when the backup completes successfully.
Options
This option only backs up configuration files. The configuration files are as follows:
postgresql.conf (postgresql.conf)
File for host-based authentication (pg_hba.conf)
Configuration file for ident authentication (pg_ident.conf)
If an external reference, such as 'include' in postgresql.conf, is set, the reference destination files are also backed up.
Sets checkpoint mode to fast or spread (default).
If fast is specified, the checkpoint processing at the start of backup becomes quick, but the impact on performance of running applications gets larger due to intense I/O. In spread mode, the impact on applications is smaller but the backup takes longer, because the checkpoint is performed slowly.
Specify the data directory.If this option is omitted, the value of the environment variable PGDATA is used.
Specify the postgresql.conf configuration file.This option is set if the data directory and the configuration file set in the 'data_directory' parameter of the postgresql.conf file are running in separate directories.
Specify the user name of the database superuser. This defaults to the name of the effective user running pgx_dmpall.
Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.
Force pgx_dmpall to prompt for a password before connecting to a database.
This option is never essential, since pgx_dmpall will automatically prompt for a password if the server demands password authentication. However, pgx_dmpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt.
Specifies the name of the database to connect to. If not specified, the postgres database will be used; if that does not exist, template1 will be used.
Environment
Specify the data directory. You can overwrite using the -D option.
Diagnostics
0: Normal exit
Other than 0: Abnormal exit
Notes
This command can only be executed when the database server is running.
Execute this command as a PostgreSQL user account.
Do not update or delete files in the backup storage directory. Otherwise, you may not be able to recover the database.
Do not store other files in the backup storage directory.
This command uses one database connection. To establish a connection, this command uses the IPv4 loopback address 127.0.0.1 on Windows, and the UNIX domain socket on other operating systems. Therefore, permit these connections in pg_hba.conf.
This command cannot be executed on the standby server.
Example
In the following example, the data directory, tablespaces, and configuration files are backed up. At this time, stored WALs are no longer necessary because the backups are destroyed.
$ pgx_dmpall
Related item
pgx_rcvall