DOKK / manpages / debian 10 / pgbackrest / pgbackrest.1.en
pgbackrest(1) pgBackRest Command Reference pgbackrest(1)

pgBackRest - Reliable PostgreSQL Backup & Restore

pgbackrest [options] [command]

pgBackRest aims to be a simple, reliable backup and restore solution that can seamlessly scale up to the largest databases and workloads by utilizing algorithms that are optimized for database-specific requirements.

Get a WAL segment from the archive.
Push a WAL segment to the archive.
Backup a database cluster.
Check the configuration.
Expire backups that exceed retention.
Get help.
Retrieve information about backups.
Restore a database cluster.
Create the required stanza data.
Delete a stanza.
Upgrade a stanza.
Allow pgBackRest processes to run.
Stop pgBackRest processes from running.
Get version.

Archive Options:

Push/get WAL segments asynchronously. [default=n]
Maximum size of the pgBackRest archive-get queue. [default=134217728]
Maximum size of the PostgreSQL archive queue.
Archive timeout. [default=60]

Backup Options:

Check that WAL segments are in the archive before backup completes. [default=y]
Copy WAL segments needed for consistency to the backup. [default=n]
Backup from the standby cluster. [default=n]
Validate data page checksums.
Exclude paths/files from the backup.
Force an offline backup. [default=n]
Manifest save threshold during backup. [default=1073741824]
Perform an online backup. [default=y]
Allow resume of failed backup. [default=y]
Force a checkpoint to start backup quickly. [default=n]
Stop prior failed backup on new backup. [default=n]
Backup type. [default=incr]

General Options:

Buffer size for file operations. [default=4194304]
Path to ssh client executable. [default=ssh]
Use gzip file compression. [default=y]
Compression level for stored files. [default=6]
Compression level for network transfer when compress=n. [default=3]
pgBackRest configuration file. [default=/etc/pgbackrest/pgbackrest.conf]
Path to additional pgBackRest configuration files. [default=/etc/pgbackrest/conf.d]
Base path of pgBackRest configuration files. [default=/etc/pgbackrest]
Database query timeout. [default=1800]
Restore or backup using checksums. [default=n]
Path where lock files are stored. [default=/tmp/pgbackrest]
Use a neutral umask. [default=y]
Max processes to use for compress/transfer. [default=1]
Protocol timeout. [default=1830]
Path where transient data is stored. [default=/var/spool/pgbackrest]
Defines the stanza.

Info Options:

Output format. [default=text]

Log Options:

Level for console logging. [default=warn]
Level for file logging. [default=info]
Level for stderr logging. [default=warn]
Path where log files are stored. [default=/var/log/pgbackrest]
Enable logging in subprocesses. [default=n]
Enable timestamp in logging. [default=y]

Repository Options:

Repository cipher passphrase.
Cipher used to encrypt the repository. [default=none]
Hardlink files between backups in the repository. [default=n]
Repository host when operating remotely via SSH.
pgBackRest exe path on the repository host.
pgBackRest repository host configuration file. [default=/etc/pgbackrest/pgbackrest.conf]
pgBackRest repository host configuration include path. [default=/etc/pgbackrest/conf.d]
pgBackRest repository host configuration path. [default=/etc/pgbackrest]
Repository host port when repo-host is set.
Repository host user when repo-host is set. [default=pgbackrest]
Path where backups and archive are stored. [default=/var/lib/pgbackrest]
Number of backups worth of continuous WAL to retain.
Backup type for WAL retention. [default=full]
Number of differential backups to retain.
Number of full backups to retain.
S3 repository bucket.
S3 SSL CA File.
S3 SSL CA Path.
S3 repository endpoint.
S3 repository host.
S3 repository access key.
S3 repository secret access key.
S3 repository region.
S3 repository security token.
Verify S3 server certificate. [default=y]
Type of storage used for the repository. [default=posix]

Restore Options:

Restore only specified databases.
Force a restore. [default=n]
Restore all symlinks. [default=n]
Modify the destination of a symlink.
Set an option in recovery.conf.
Backup set to restore. [default=latest]
Restore a tablespace into the specified directory.
Restore all tablespaces into the specified directory.
Recovery target.
Action to take when recovery target is reached. [default=pause]
Stop just before the recovery target is reached. [default=n]
Recover along a timeline.
Recovery type. [default=default]

Stanza Options:

PostgreSQL host for operating remotely via SSH.
pgBackRest exe path on the PostgreSQL host.
pgBackRest database host configuration file. [default=/etc/pgbackrest/pgbackrest.conf]
pgBackRest database host configuration include path. [default=/etc/pgbackrest/conf.d]
pgBackRest database host configuration path. [default=/etc/pgbackrest]
PostgreSQL host port when pg-host is set.
PostgreSQL host logon user when pg-host is set. [default=postgres]
PostgreSQL data directory.
PostgreSQL port. [default=5432]
PostgreSQL unix socket path.

Stanza-create Options:

Force stanza creation. [default=n]
Create on an online cluster. [default=y]

Stanza-delete Options:

Force stanza delete. [default=n]

Stanza-upgrade Options:

Update an online cluster. [default=y]

Stop Options:

Force all pgBackRest processes to stop. [default=n]

/etc/pgbackrest/pgbackrest.conf /var/lib/pgbackrest /var/log/pgbackrest /var/spool/pgbackrest /tmp/pgbackrest

Create a backup of the PostgreSQL `main` cluster:


$ pgbackrest --stanza=main backup
The `main` cluster should be configured in `/etc/pgbackrest/pgbackrest.conf`
Show all available backups:


$ pgbackrest info
Show all available backups for a specific cluster:


$ pgbackrest --stanza=main info
Show backup specific options:


$ pgbackrest help backup

/usr/share/doc/pgbackrest-doc/html/index.html http://www.pgbackrest.org

11 February 2019