pgBackRest is a free, open-source solution for PostgreSQL backup and restore designed to handle everything from small databases to multi-terabyte enterprise workloads. The project’s current stable release is v2.56.0, distributed under the MIT license, and it’s actively supported by contributors and organizations such as Crunchy Data and Resonate.


Key features

Parallel backup and restore

Compression is often the bottleneck during backups. pgBackRest solves this with parallel processing and efficient algorithms such as lz4 and zstd, significantly speeding up operations.

Local or remote operation

A custom protocol allows backup, restore, and archiving locally or via TLS/SSH with minimal setup. Remote PostgreSQL access is never required, improving security.

Multiple repositories

Supports multi-repository setups, e.g. a local repo for quick restores and a remote repo with longer retention for redundancy.

Backup types and levels

  • Full, differential, and incremental backups.
  • File-level or block-level, with block-level backups saving space by only copying changed portions.

Retention and archive expiration

Flexible rotation policies allow you to maintain WAL archives only for the latest backups, or indefinitely if required.

Backup integrity

  • Checksums for every file, verified during backup and restore.
  • Ensures consistency by waiting for all required WAL segments.
  • Backups can be mounted directly as PostgreSQL clusters if compression is disabled and hard links are enabled.

Page checksums

If enabled in PostgreSQL, pgBackRest validates checksums to detect page-level corruption early, avoiding invalid data creeping into future backups.

Backup resume

Interrupted backups can resume from the last point, using checksum comparisons to avoid retransmitting unchanged data.

Streaming compression and checksums

Compression and checksum calculation are performed in-stream, optimizing bandwidth and CPU usage across local or remote repositories.

Delta restore

Uses stored checksums to skip restoring unchanged files, removing files not in the backup and restoring only what’s necessary. Greatly reduces restore times when combined with parallelism.

WAL push and get (parallel and async)

  • Asynchronous WAL push compresses and transfers in parallel, vital for high-write environments.
  • WAL get prefetches and decompresses WAL segments, improving replay performance, especially with high-latency storage (e.g., S3).
  • Prevents misconfiguration by verifying PostgreSQL version and system identifiers.

Tablespaces and links

  • Full tablespace support with remapping options.
  • File/directory links can be restored as links, remapped, or converted into normal files/dirs.

Cloud object storage

Repositories can be located in S3, Azure, or GCS-compatible stores, enabling virtually unlimited capacity and retention.

Encryption

Repositories can be encrypted to protect backup data wherever stored.

PostgreSQL version support

Supports 10 PostgreSQL versions at a time — the five currently supported and the last five EOL versions — ensuring long upgrade windows.


Getting started

pgBackRest is designed for ease of configuration and operation:

  • User guides are available for multiple operating systems and PostgreSQL versions.
  • Full command reference for CLI operations.
  • Configuration reference for creating pgBackRest configs.

Version 2 remains backward-compatible with v1, so existing configurations and repositories continue to work.


Community and contributions

  • pgBackRest is MIT-licensed: free for personal and commercial use without restrictions.
  • Contributions are welcome; see the contributing guidelines for details.
  • Bug reports are handled with high priority.

Support

While pgBackRest is a powerful tool, designing a full disaster recovery policy with replication and backup strategies can be complex. Many PostgreSQL service providers offer professional support to help enterprises integrate pgBackRest into production.


Recognition

The development of pgBackRest has been generously supported by Crunchy Data and Resonate.


🔗 Official GitHub repository: pgBackRest

Scroll to Top