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.
Archive Options:
Backup Options:
- --archive-check
- Check that WAL segments are in the archive before backup completes.
[default=y]
- --archive-copy
- Copy WAL segments needed for consistency to the backup. [default=n]
- --backup-standby
- Backup from the standby cluster. [default=n]
- --checksum-page
- Validate data page checksums.
- --exclude
- Exclude paths/files from the backup.
- --force
- Force an offline backup. [default=n]
- --manifest-save-threshold
- Manifest save threshold during backup. [default=1073741824]
- --online
- Perform an online backup. [default=y]
- --resume
- Allow resume of failed backup. [default=y]
- --start-fast
- Force a checkpoint to start backup quickly. [default=n]
- --stop-auto
- Stop prior failed backup on new backup. [default=n]
- --type
- Backup type. [default=incr]
General Options:
- --buffer-size
- Buffer size for file operations. [default=4194304]
- --cmd-ssh
- Path to ssh client executable. [default=ssh]
- --compress
- Use gzip file compression. [default=y]
- --compress-level
- Compression level for stored files. [default=6]
- --compress-level-network
- Compression level for network transfer when compress=n. [default=3]
- --config
- pgBackRest configuration file.
[default=/etc/pgbackrest/pgbackrest.conf]
- --config-include-path
- Path to additional pgBackRest configuration files.
[default=/etc/pgbackrest/conf.d]
- --config-path
- Base path of pgBackRest configuration files.
[default=/etc/pgbackrest]
- --db-timeout
- Database query timeout. [default=1800]
- --delta
- Restore or backup using checksums. [default=n]
- --lock-path
- Path where lock files are stored. [default=/tmp/pgbackrest]
- --neutral-umask
- Use a neutral umask. [default=y]
- --process-max
- Max processes to use for compress/transfer. [default=1]
- --protocol-timeout
- Protocol timeout. [default=1830]
- --spool-path
- Path where transient data is stored.
[default=/var/spool/pgbackrest]
- --stanza
- Defines the stanza.
Info Options:
Log Options:
Repository Options:
Restore Options:
Stanza Options:
Stanza-create Options:
- --force
- Force stanza creation. [default=n]
- --online
- Create on an online cluster. [default=y]
Stanza-delete Options:
- --force
- Force stanza delete. [default=n]
Stanza-upgrade Options:
- --online
- Update an online cluster. [default=y]
Stop Options:
- --force
- 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