Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsMay 30, 2026·3 min de lectura

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.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
pgBackRest
Comando de instalación directa
npx -y tokrepo@latest install f712e179-5bdf-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con 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

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados