Skip to content

PGBACKREST

29 pages
  • pgBackRest 2.60.0 Documentation

    In pgbackrest

    ConceptPGBACKREST

    Introduction pgBackRest is a reliable backup and restore solution for PostgreSQL that seamlessly scales up to the largest databases and workloads. This documentation mirror covers pgBackRest v2.60.0. Release notes are on the Releases page. Version …

    Introduction pgBackRest is a reliable backup and restore solution for PostgreSQL that seamlessly scales up to the largest databases and workloads. This documentation mirror covers pgBackRest v2.60.0. Release notes are on the Releases page. Version …

  • Version Command (version)

    In Commands

    ReferencePGBACKREST

    Displays installed pgBackRest version. Command Options Output Option (--output) Output type. The following output types are supported: text - Display the installed pgBackRest version as text. num - Display the installed pgBackRest version as an …

    Displays installed pgBackRest version. Command Options Output Option (--output) Output type. The following output types are supported: text - Display the installed pgBackRest version as text. num - Display the installed pgBackRest version as an …

  • Verify Command (verify)

    In Commands

    ReferencePGBACKREST

    Verify determines if the backups and archives in a repository are valid. Command Options Output Option (--output) Output type. The following output types are supported: none - No verify output. text - Output verify information to stdout. default: …

    Verify determines if the backups and archives in a repository are valid. Command Options Output Option (--output) Output type. The following output types are supported: none - No verify output. text - Output verify information to stdout. default: …

  • Stop Command (stop)

    In Commands

    ReferencePGBACKREST

    Does not allow any new pgBackRest processes to run. By default running processes will be allowed to complete successfully. Use the --force option to terminate running processes. pgBackRest processes will return an error if they are run after the stop …

    Does not allow any new pgBackRest processes to run. By default running processes will be allowed to complete successfully. Use the --force option to terminate running processes. pgBackRest processes will return an error if they are run after the stop …

  • Start Command (start)

    In Commands

    ReferencePGBACKREST

    If the pgBackRest processes were previously stopped using the stop command then they can be started again using the start command. Note that this will not immediately start up any pgBackRest processes but they are allowed to run. See Starting and …

    If the pgBackRest processes were previously stopped using the stop command then they can be started again using the start command. Note that this will not immediately start up any pgBackRest processes but they are allowed to run. See Starting and …

  • Stanza Upgrade Command (stanza-upgrade)

    In Commands

    ReferencePGBACKREST

    Immediately after upgrading PostgreSQL to a newer major version, the pg-path for all pgBackRest configurations must be set to the new database location and the stanza-upgrade command run. If there is more than one repository configured on the host, …

    Immediately after upgrading PostgreSQL to a newer major version, the pg-path for all pgBackRest configurations must be set to the new database location and the stanza-upgrade command run. If there is more than one repository configured on the host, …

  • Stanza Delete Command (stanza-delete)

    In Commands

    ReferencePGBACKREST

    The stanza-delete command removes data in the repository associated with a stanza. WARNING: Use this command with caution — it will permanently remove all backups and archives from the pgBackRest repository for the specified stanza. To delete a …

    The stanza-delete command removes data in the repository associated with a stanza. WARNING: Use this command with caution — it will permanently remove all backups and archives from the pgBackRest repository for the specified stanza. To delete a …

  • Stanza Create Command (stanza-create)

    In Commands

    ReferencePGBACKREST

    The stanza-create command must be run after the stanza has been configured in pgbackrest.conf. If there is more than one repository configured, the stanza will be created on each. Stanzas that have already been created will be skipped so it is always …

    The stanza-create command must be run after the stanza has been configured in pgbackrest.conf. If there is more than one repository configured, the stanza will be created on each. Stanzas that have already been created will be skipped so it is always …

  • Server Ping Command (server-ping)

    In Commands

    ReferencePGBACKREST

    Ping a pgBackRest TLS server to ensure it is accepting connections. This serves as an aliveness check only since no authentication is attempted. If no host is specified on the command-line then the tls-server-host option will be used. Command Options …

    Ping a pgBackRest TLS server to ensure it is accepting connections. This serves as an aliveness check only since no authentication is attempted. If no host is specified on the command-line then the tls-server-host option will be used. Command Options …

  • Server Command (server)

    In Commands

    ReferencePGBACKREST

    The pgBackRest server allows access to remote hosts without using the SSH protocol. Command Options TLS Server Address Option (--tls-server-address) TLS server address. IP address the server will listen on for client requests. default: localhost …

    The pgBackRest server allows access to remote hosts without using the SSH protocol. Command Options TLS Server Address Option (--tls-server-address) TLS server address. IP address the server will listen on for client requests. default: localhost …

  • Restore Command (restore)

    In Commands

    ReferencePGBACKREST

    The restore command automatically defaults to selecting the latest backup from the first repository where backups exist (see Quick Start - Restore a Backup). The order in which the repositories are checked is dictated by the pgbackrest.conf (e.g. …

    The restore command automatically defaults to selecting the latest backup from the first repository where backups exist (see Quick Start - Restore a Backup). The order in which the repositories are checked is dictated by the pgbackrest.conf (e.g. …

  • Repository List Command (repo-ls)

    In Commands

    ReferencePGBACKREST

    Similar to the unix ls command but works on any supported repository type. This command accepts a path, absolute or relative to the repository path defined by the --repo-path option, and is primarily for administration, investigation, and testing. It …

    Similar to the unix ls command but works on any supported repository type. This command accepts a path, absolute or relative to the repository path defined by the --repo-path option, and is primarily for administration, investigation, and testing. It …

  • Repository Get Command (repo-get)

    In Commands

    ReferencePGBACKREST

    Similar to the unix cat command but works on any supported repository type. This command requires a fully qualified file name and is primarily for administration, investigation, and testing. It is not a required part of a normal pgBackRest setup. If …

    Similar to the unix cat command but works on any supported repository type. This command requires a fully qualified file name and is primarily for administration, investigation, and testing. It is not a required part of a normal pgBackRest setup. If …

  • Project Metrics

    In pgbackrest

    ConceptPGBACKREST

    Code Coverage pgBackRest aims to have complete function/branch/line coverage for the core C code in /src. Function/line coverage is complete with no exceptions. Branch coverage excludes branches inside macros and assert() calls. Macros have their …

    Code Coverage pgBackRest aims to have complete function/branch/line coverage for the core C code in /src. Function/line coverage is complete with no exceptions. Branch coverage excludes branches inside macros and assert() calls. Macros have their …

  • Info Command (info)

    In Commands

    ReferencePGBACKREST

    The info command operates on a single stanza or all stanzas. Text output is the default and gives a human-readable summary of backups for the stanza(s) requested. This format is subject to change with any release. For machine-readable output use …

    The info command operates on a single stanza or all stanzas. Text output is the default and gives a human-readable summary of backups for the stanza(s) requested. This format is subject to change with any release. For machine-readable output use …

  • Help Command (help)

    In Commands

    ReferencePGBACKREST

    Three levels of help are provided. If no command is specified then general help will be displayed. If a command is specified (e.g. pgbackrest help backup) then a full description of the command will be displayed along with a list of valid options. If …

    Three levels of help are provided. If no command is specified then general help will be displayed. If a command is specified (e.g. pgbackrest help backup) then a full description of the command will be displayed along with a list of valid options. If …

  • Frequently Asked Questions

    In pgbackrest

    ReferencePGBACKREST

    Introduction Frequently Asked Questions are intended to provide details for specific questions that may or may not be covered in the User Guide, Configuration, or Command reference. If you are unable to find details for your specific issue here, …

    Introduction Frequently Asked Questions are intended to provide details for specific questions that may or may not be covered in the User Guide, Configuration, or Command reference. If you are unable to find details for your specific issue here, …

  • Release Notes

    In pgbackrest

    ReferencePGBACKREST

    Introduction pgBackRest release numbers consist of three parts: major, minor, and patch. A major release may break compatibility with the prior major release, but v2 releases are fully compatible with v1 repositories and will accept all v1 options. …

    Introduction pgBackRest release numbers consist of three parts: major, minor, and patch. A major release may break compatibility with the prior major release, but v2 releases are fully compatible with v1 repositories and will accept all v1 options. …

  • Expire Command (expire)

    In Commands

    ReferencePGBACKREST

    pgBackRest does full backup rotation based on the retention type which can be a count or a time period. When a count is specified, then expiration is not concerned with when the backups were created but with how many must be retained. Differential …

    pgBackRest does full backup rotation based on the retention type which can be a count or a time period. When a count is specified, then expiration is not concerned with when the backups were created but with how many must be retained. Differential …

  • Configuration Reference

    In pgbackrest

    ReferencePGBACKREST

    Introduction pgBackRest can be used entirely with command-line parameters but a configuration file is more practical for installations that are complex or set a lot of options. The default location for the configuration file is …

    Introduction pgBackRest can be used entirely with command-line parameters but a configuration file is more practical for installations that are complex or set a lot of options. The default location for the configuration file is …

  • Check Command (check)

    In Commands

    ReferencePGBACKREST

    The check command validates that pgBackRest and the archive_command setting are configured correctly for archiving and backups for the specified stanza. It will attempt to check all repositories and databases that are configured for the host on which …

    The check command validates that pgBackRest and the archive_command setting are configured correctly for archiving and backups for the specified stanza. It will attempt to check all repositories and databases that are configured for the host on which …

  • Command Reference

    In Commands

    ReferencePGBACKREST

    Introduction Commands are used to execute the various pgBackRest functions. Here the command options are listed exhaustively, that is, each option applicable to a command is listed with that command even if it applies to one or more other commands. …

    Introduction Commands are used to execute the various pgBackRest functions. Here the command options are listed exhaustively, that is, each option applicable to a command is listed with that command even if it applies to one or more other commands. …

  • Backup Command (backup)

    In Commands

    ReferencePGBACKREST

    When multiple repositories are configured, pgBackRest will backup to the highest priority repository (e.g. repo1) unless the --repo option is specified. pgBackRest does not have a built-in scheduler so it’s best to run it from cron or some other …

    When multiple repositories are configured, pgBackRest will backup to the highest priority repository (e.g. repo1) unless the --repo option is specified. pgBackRest does not have a built-in scheduler so it’s best to run it from cron or some other …

  • User Guide (RHEL)

    In pgbackrest

    TutorialPGBACKREST

    Introduction This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the Restore section relies on setup that is performed in the Quick Start section. Once pgBackRest is up and …

    Introduction This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the Restore section relies on setup that is performed in the Quick Start section. Once pgBackRest is up and …

  • Archive Push Command (archive-push)

    In Commands

    ReferencePGBACKREST

    Accepts a WAL segment from PostgreSQL and archives it in each repository defined by the indexed repo-path option (see the Repository section for information on configuring repositories). The WAL segment may be pushed immediately to the archive or …

    Accepts a WAL segment from PostgreSQL and archives it in each repository defined by the indexed repo-path option (see the Repository section for information on configuring repositories). The WAL segment may be pushed immediately to the archive or …

  • User Guide (Debian/Ubuntu)

    In pgbackrest

    TutorialPGBACKREST

    Introduction This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the Restore section relies on setup that is performed in the Quick Start section. Once pgBackRest is up and …

    Introduction This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the Restore section relies on setup that is performed in the Quick Start section. Once pgBackRest is up and …

  • Archive Get Command (archive-get)

    In Commands

    ReferencePGBACKREST

    This command is used by PostgreSQL to restore a backup, perform PITR, or as an alternative to streaming for keeping a replica up to date. WAL segments are required for PostgreSQL recovery or to maintain a replica. When multiple repositories are …

    This command is used by PostgreSQL to restore a backup, perform PITR, or as an alternative to streaming for keeping a replica up to date. WAL segments are required for PostgreSQL recovery or to maintain a replica. When multiple repositories are …

  • News

    In pgbackrest

    ReferencePGBACKREST

    pgBackRest 2.60.0 Released October 18, 2026 The pgBackRest community is pleased to announce the release of pgBackRest 2.60.0, the latest version of the reliable, easy-to-use backup and restore solution that can seamlessly scale up to the largest …

    pgBackRest 2.60.0 Released October 18, 2026 The pgBackRest community is pleased to announce the release of pgBackRest 2.60.0, the latest version of the reliable, easy-to-use backup and restore solution that can seamlessly scale up to the largest …

  • Annotate Command (annotate)

    In Commands

    ReferencePGBACKREST

    Annotations included with the backup command can be added, modified, or removed afterwards using the annotate command. Command Options Backup Annotation Option (--annotation) Annotate backup with user-defined key/value pairs. Users can attach …

    Annotations included with the backup command can be added, modified, or removed afterwards using the annotate command. Command Options Backup Annotation Option (--annotation) Annotate backup with user-defined key/value pairs. Users can attach …