.\" Text automatically generated by txt2man .TH pgbackrest 1 "11 February 2019" "" "pgBackRest Command Reference" .SH NAME \fBpgBackRest \fP- Reliable PostgreSQL Backup & Restore \fB .SH SYNOPSIS .nf .fam C \fBpgbackrest\fP [\fIoptions\fP] [\fIcommand\fP] .fam T .fi .fam T .fi .SH DESCRIPTION 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. .SH COMMANDS .TP .B archive-get Get a WAL segment from the archive. .TP .B archive-push Push a WAL segment to the archive. .TP .B backup Backup a database cluster. .TP .B check Check the configuration. .TP .B expire Expire backups that exceed retention. .TP .B help Get help. .TP .B info Retrieve information about backups. .TP .B restore Restore a database cluster. .TP .B stanza-create Create the required stanza data. .TP .B stanza-delete Delete a stanza. .TP .B stanza-upgrade Upgrade a stanza. .TP .B start Allow pgBackRest processes to run. .TP .B stop Stop pgBackRest processes from running. .TP .B version Get version. .SH OPTIONS Archive Options: .RS .TP .B \fB--archive-async\fP Push/get WAL segments asynchronously. [default=n] .TP .B \fB--archive-get-queue-max\fP Maximum size of the pgBackRest archive-get queue. [default=134217728] .TP .B \fB--archive-push-queue-max\fP Maximum size of the PostgreSQL archive queue. .TP .B \fB--archive-timeout\fP Archive timeout. [default=60] .RE .PP Backup Options: .RS .TP .B \fB--archive-check\fP Check that WAL segments are in the archive before backup completes. [default=y] .TP .B \fB--archive-copy\fP Copy WAL segments needed for consistency to the backup. [default=n] .TP .B \fB--backup-standby\fP Backup from the standby cluster. [default=n] .TP .B \fB--checksum-page\fP Validate data page checksums. .TP .B \fB--exclude\fP Exclude paths/files from the backup. .TP .B \fB--force\fP Force an offline backup. [default=n] .TP .B \fB--manifest-save-threshold\fP Manifest save threshold during backup. [default=1073741824] .TP .B \fB--online\fP Perform an online backup. [default=y] .TP .B \fB--resume\fP Allow resume of failed backup. [default=y] .TP .B \fB--start-fast\fP Force a checkpoint to start backup quickly. [default=n] .TP .B \fB--stop-auto\fP Stop prior failed backup on new backup. [default=n] .TP .B \fB--type\fP Backup type. [default=incr] .RE .PP General Options: .RS .TP .B \fB--buffer-size\fP Buffer size for file operations. [default=4194304] .TP .B \fB--cmd-ssh\fP Path to ssh client executable. [default=ssh] .TP .B \fB--compress\fP Use gzip file compression. [default=y] .TP .B \fB--compress-level\fP Compression level for stored files. [default=6] .TP .B \fB--compress-level-network\fP Compression level for network transfer when compress=n. [default=3] .TP .B \fB--config\fP pgBackRest configuration file. [default=/etc/\fBpgbackrest\fP/pgbackrest.conf] .TP .B \fB--config-include-path\fP Path to additional pgBackRest configuration files. [default=/etc/\fBpgbackrest\fP/conf.d] .TP .B \fB--config-path\fP Base path of pgBackRest configuration files. [default=/etc/\fBpgbackrest\fP] .TP .B \fB--db-timeout\fP Database query timeout. [default=1800] .TP .B \fB--delta\fP Restore or backup using checksums. [default=n] .TP .B \fB--lock-path\fP Path where lock files are stored. [default=/tmp/\fBpgbackrest\fP] .TP .B \fB--neutral-umask\fP Use a neutral umask. [default=y] .TP .B \fB--process-max\fP Max processes to use for compress/transfer. [default=1] .TP .B \fB--protocol-timeout\fP Protocol timeout. [default=1830] .TP .B \fB--spool-path\fP Path where transient data is stored. [default=/var/spool/\fBpgbackrest\fP] .TP .B \fB--stanza\fP Defines the stanza. .RE .PP Info Options: .RS .TP .B \fB--output\fP Output format. [default=text] .RE .PP Log Options: .RS .TP .B \fB--log-level-console\fP Level for console logging. [default=warn] .TP .B \fB--log-level-file\fP Level for file logging. [default=info] .TP .B \fB--log-level-stderr\fP Level for stderr logging. [default=warn] .TP .B \fB--log-path\fP Path where log files are stored. [default=/var/log/\fBpgbackrest\fP] .TP .B \fB--log-subprocess\fP Enable logging in subprocesses. [default=n] .TP .B \fB--log-timestamp\fP Enable timestamp in logging. [default=y] .RE .PP Repository Options: .RS .TP .B \fB--repo-cipher-pass\fP Repository cipher passphrase. .TP .B \fB--repo-cipher-type\fP Cipher used to encrypt the repository. [default=none] .TP .B \fB--repo-hardlink\fP Hardlink files between backups in the repository. [default=n] .TP .B \fB--repo-host\fP Repository host when operating remotely via SSH. .TP .B \fB--repo-host-cmd\fP pgBackRest exe path on the repository host. .TP .B \fB--repo-host-config\fP pgBackRest repository host configuration file. [default=/etc/\fBpgbackrest\fP/pgbackrest.conf] .TP .B \fB--repo-host-config-include-path\fP pgBackRest repository host configuration include path. [default=/etc/\fBpgbackrest\fP/conf.d] .TP .B \fB--repo-host-config-path\fP pgBackRest repository host configuration path. [default=/etc/\fBpgbackrest\fP] .TP .B \fB--repo-host-port\fP Repository host port when repo-host is set. .TP .B \fB--repo-host-user\fP Repository host user when repo-host is set. [default=\fBpgbackrest\fP] .TP .B \fB--repo-path\fP Path where backups and archive are stored. [default=/var/lib/\fBpgbackrest\fP] .TP .B \fB--repo-retention-archive\fP Number of backups worth of continuous WAL to retain. .TP .B \fB--repo-retention-archive-type\fP Backup type for WAL retention. [default=full] .TP .B \fB--repo-retention-diff\fP Number of differential backups to retain. .TP .B \fB--repo-retention-full\fP Number of full backups to retain. .TP .B \fB--repo-s3-bucket\fP S3 repository bucket. .TP .B \fB--repo-s3-ca-file\fP S3 SSL CA File. .TP .B \fB--repo-s3-ca-path\fP S3 SSL CA Path. .TP .B \fB--repo-s3-endpoint\fP S3 repository endpoint. .TP .B \fB--repo-s3-host\fP S3 repository host. .TP .B \fB--repo-s3-key\fP S3 repository access key. .TP .B \fB--repo-s3-key-secret\fP S3 repository secret access key. .TP .B \fB--repo-s3-region\fP S3 repository region. .TP .B \fB--repo-s3-token\fP S3 repository security token. .TP .B \fB--repo-s3-verify-ssl\fP Verify S3 server certificate. [default=y] .TP .B \fB--repo-type\fP Type of storage used for the repository. [default=posix] .RE .PP Restore Options: .RS .TP .B \fB--db-include\fP Restore only specified databases. .TP .B \fB--force\fP Force a restore. [default=n] .TP .B \fB--link-all\fP Restore all symlinks. [default=n] .TP .B \fB--link-map\fP Modify the destination of a symlink. .TP .B \fB--recovery-option\fP Set an option in recovery.conf. .TP .B \fB--set\fP Backup set to restore. [default=latest] .TP .B \fB--tablespace-map\fP Restore a tablespace into the specified directory. .TP .B \fB--tablespace-map-all\fP Restore all tablespaces into the specified directory. .TP .B \fB--target\fP Recovery target. .TP .B \fB--target-action\fP Action to take when recovery target is reached. [default=pause] .TP .B \fB--target-exclusive\fP Stop just before the recovery target is reached. [default=n] .TP .B \fB--target-timeline\fP Recover along a timeline. .TP .B \fB--type\fP Recovery type. [default=default] .RE .PP Stanza Options: .RS .TP .B \fB--pg-host\fP PostgreSQL host for operating remotely via SSH. .TP .B \fB--pg-host-cmd\fP pgBackRest exe path on the PostgreSQL host. .TP .B \fB--pg-host-config\fP pgBackRest database host configuration file. [default=/etc/\fBpgbackrest\fP/pgbackrest.conf] .TP .B \fB--pg-host-config-include-path\fP pgBackRest database host configuration include path. [default=/etc/\fBpgbackrest\fP/conf.d] .TP .B \fB--pg-host-config-path\fP pgBackRest database host configuration path. [default=/etc/\fBpgbackrest\fP] .TP .B \fB--pg-host-port\fP PostgreSQL host port when pg-host is set. .TP .B \fB--pg-host-user\fP PostgreSQL host logon user when pg-host is set. [default=postgres] .TP .B \fB--pg-path\fP PostgreSQL data directory. .TP .B \fB--pg-port\fP PostgreSQL port. [default=5432] .TP .B \fB--pg-socket-path\fP PostgreSQL unix socket path. .RE .PP Stanza-create Options: .RS .TP .B \fB--force\fP Force stanza creation. [default=n] .TP .B \fB--online\fP Create on an online cluster. [default=y] .RE .PP Stanza-delete Options: .RS .TP .B \fB--force\fP Force stanza delete. [default=n] .RE .PP Stanza-upgrade Options: .RS .TP .B \fB--online\fP Update an online cluster. [default=y] .RE .PP Stop Options: .RS .TP .B \fB--force\fP Force all pgBackRest processes to stop. [default=n] .SH FILES /etc/\fBpgbackrest\fP/pgbackrest.conf /var/lib/\fBpgbackrest\fP /var/log/\fBpgbackrest\fP /var/spool/\fBpgbackrest\fP /tmp/\fBpgbackrest\fP .SH EXAMPLES .IP \(bu 3 Create a backup of the PostgreSQL `main` cluster: .PP .nf .fam C $ pgbackrest --stanza=main backup The `main` cluster should be configured in `/etc/pgbackrest/pgbackrest.conf` .fam T .fi .IP \(bu 3 Show all available backups: .PP .nf .fam C $ pgbackrest info .fam T .fi .IP \(bu 3 Show all available backups for a specific cluster: .PP .nf .fam C $ pgbackrest --stanza=main info .fam T .fi .IP \(bu 3 Show backup specific \fIoptions\fP: .PP .nf .fam C $ pgbackrest help backup .fam T .fi .SH SEE ALSO /usr/share/doc/\fBpgbackrest\fP-doc/html/index.html http://www.pgbackrest.org