.\" Text automatically generated by txt2man .TH pgbackrest 1 "15 December 2016" "" "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 system that can seamlessly scale up to the largest databases and workloads. .PP Instead of relying on traditional backup tools like tar and rsync, pgBackRest implements all backup features internally and uses a custom protocol for communicating with remote systems. Removing reliance on tar and rsync allows for better solutions to database-specific backup challenges. The custom remote protocol allows for more flexibility and limits the types of connections that are required to perform a backup which increases security. .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 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 Archive WAL segments asynchronously. [default=n] .TP .B \fB--archive-max-mb\fP Limit size of the local asynchronous archive queue when archive-async=y. .RE .PP Backup Options: .RS .TP .B \fB--archive-check\fP Check that WAL segments are present 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-cmd\fP pgBackRest exe path on the backup host. [default=\fBpgbackrest\fP] .TP .B \fB--backup-config\fP pgBackRest backup host configuration file. [default=/etc/pgbackrest.conf] .TP .B \fB--backup-host\fP Backup host when operating remotely via SSH. .TP .B \fB--backup-standby\fP Backup from the standby cluster. [default=n] .TP .B \fB--backup-user\fP Backup host user when backup-host is set. [default=backrest] .TP .B \fB--force\fP Force an offline backup. [default=n] .TP .B \fB--hardlink\fP Hardlink files between backups. [default=n] .TP .B \fB--manifest-save-threshold\fP Manifest save threshold during backup. [default=1073741824] .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 Expire Options: .RS .TP .B \fB--retention-archive\fP Number of backups worth of continuous WAL to retain. .TP .B \fB--retention-archive-type\fP Backup type for WAL retention. [default=full] .TP .B \fB--retention-diff\fP Number of differential backups to retain. .TP .B \fB--retention-full\fP Number of full backups to retain. .RE .PP General Options: .RS .TP .B \fB--archive-timeout\fP Archive timeout. [default=60] .TP .B \fB--buffer-size\fP Buffer size for file operations. [default=4194304] .TP .B \fB--checksum-page\fP Validate data page checksums. .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/pgbackrest.conf] .TP .B \fB--db-timeout\fP Database query timeout. [default=1800] .TP .B \fB--lock-path\fP Path where lock files are stored. [default=/tmp/\fBpgbackrest\fP] .TP .B \fB--log-path\fP Path where log files are stored. [default=/var/log/\fBpgbackrest\fP] .TP .B \fB--neutral-umask\fP Use a neutral umask. [default=y] .TP .B \fB--online\fP Perform an online backup. [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--repo-link\fP Create convenience symlinks in repository. [default=y] .TP .B \fB--repo-path\fP Repository path where WAL segments and backups stored. [default=/var/lib/\fBpgbackrest\fP] .TP .B \fB--repo-sync\fP Sync directories in repository. [default=y] .TP .B \fB--spool-path\fP Path where WAL segments are spooled during async archiving. [default=/var/spool/\fBpgbackrest\fP] .TP .B \fB--stanza\fP Defines a 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] .RE .PP Restore Options: .RS .TP .B \fB--db-include\fP Restore only specified databases. .TP .B \fB--delta\fP Restore using delta. [default=n] .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--lock\fP Create a lock so restores on a stanza cannot run simultaneously. [default=y] .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--db-cmd\fP pgBackRest exe path on the database host. [default=\fBpgbackrest\fP] .TP .B \fB--db-config\fP pgBackRest database host configuration file. [default=/etc/pgbackrest.conf] .TP .B \fB--db-host\fP Cluster host for operating remotely via SSH. .TP .B \fB--db-path\fP Cluster data directory. .TP .B \fB--db-port\fP Cluster port. [default=5432] .TP .B \fB--db-socket-path\fP Cluster unix socket path. .TP .B \fB--db-user\fP Cluster host logon user when db-host is set. [default=postgres] .RE .PP Stop Options: .RS .TP .B \fB--force\fP Force all pgBackRest processes to stop. [default=n] .SH FILES /etc/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.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