pgBackRest - Reliable PostgreSQL Backup & Restore
pgbackrest [options] [command]
pgBackRest aims to be a reliable, easy-to-use 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]
- Check PostgreSQL version/id in WAL headers. [default=y]
- --archive-mode-check
- Check the PostgreSQL archive_mode setting. [default=y]
- --backup-standby
- Backup from the standby cluster. [default=n]
- --checksum-page
- Validate data page checksums.
- --exclude
- Exclude paths/files from the backup.
- --expire-auto
- Automatically run the expire command after a successful backup.
[default=y]
- --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]
Expire Options:
- --set
- Backup set to expire.
General Options:
- --config-include-path
- Path to additional pgBackRest configuration files.
[default=CFGOPTDEF_CONFIG_PATH "/"
- --pg-host-config-path
- pgBackRest database host configuration path.
[default=CFGOPTDEF_CONFIG_PATH]
- --pg-host-port
- PostgreSQL host port when pg-host is set.
- --pg-host-user
- PostgreSQL host logon user when pg-host is set. [default=postgres]
- --pg-path
- PostgreSQL data directory.
- --pg-port
- PostgreSQL port. [default=5432]
- --pg-socket-path
- PostgreSQL unix socket path.
- --pg-user
- PostgreSQL database user.
Stanza-create Options:
- --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]
/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 `CFGOPTDEF_CONFIG_PATH "/" PROJECT_CONFIG_FILE`
- •
- 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