Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 30, 2026·3 min de lecture

pgBackRest — Reliable PostgreSQL Backup and Restore

A robust open-source backup and restore solution for PostgreSQL with parallel compression, encryption, full/incremental/differential backups, and cloud storage support.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
pgBackRest
Commande d'installation directe
npx -y tokrepo@latest install f712e179-5bdf-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

pgBackRest is a backup and restore tool designed specifically for PostgreSQL. It handles the complexity of WAL archiving, parallel backup compression, and multi-repository storage so database administrators can implement reliable disaster recovery without writing custom scripts.

What pgBackRest Does

  • Creates full, incremental, and differential backups of PostgreSQL clusters
  • Archives WAL segments for point-in-time recovery (PITR)
  • Compresses backups in parallel using multiple CPU cores
  • Encrypts backups at rest with AES-256-CBC
  • Stores backups on local disk, S3, Azure Blob, or Google Cloud Storage

Architecture Overview

pgBackRest runs as a standalone process alongside PostgreSQL. It communicates with the database via the PostgreSQL protocol for backup coordination and uses file-level copy for data transfer. WAL archiving integrates through the archive_command configuration. The tool maintains a manifest of all backed-up files to enable efficient incremental backups that only transfer changed pages.

Self-Hosting & Configuration

  • Install via package manager (apt, yum) or compile from source
  • Create a stanza configuration in /etc/pgbackrest/pgbackrest.conf
  • Set archive_command in postgresql.conf to route WAL to pgBackRest
  • Configure retention policies for full and differential backup counts
  • Add S3 or GCS credentials for off-site backup storage

Key Features

  • Delta restore that only replaces files that differ from the backup
  • Backup verification with checksum validation against the PostgreSQL catalog
  • Asynchronous WAL push and pull for high-throughput archiving
  • Multiple backup repositories for redundancy across storage providers
  • Standby server backup support to offload backup I/O from the primary

Comparison with Similar Tools

  • pg_dump — logical backup only, no incremental or PITR support
  • Barman — similar feature set but Python-based with different architecture
  • WAL-G — Go-based tool focused on cloud storage, less mature retention management
  • pg_basebackup — built-in but lacks compression, encryption, and incremental support
  • Borg + pg_dump — generic backup with PostgreSQL wrapper, not database-aware

FAQ

Q: Does pgBackRest support PostgreSQL streaming replication? A: Yes. It can back up from a standby replica to avoid impacting primary performance.

Q: How fast is incremental backup? A: Incremental backups only transfer changed blocks, making them significantly faster than full backups for large databases.

Q: Can I restore to a specific point in time? A: Yes. Specify a target timestamp, transaction ID, or LSN for point-in-time recovery using archived WAL segments.

Q: What PostgreSQL versions are supported? A: pgBackRest supports PostgreSQL 9.0 through the latest release, with full feature support from version 9.4 onward.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires