Backup Best Practices
Automate restores, not just dumps - untested backups are fiction. These rules keep PostgreSQL backups recoverable under real incident pressure.
Search across all documentation pages
Automate restores, not just dumps - untested backups are fiction. These rules keep PostgreSQL backups recoverable under real incident pressure.
pg_dumpall -g) on schedule. Roles and tablespaces are not in per-DB dump alone.-Fc or -Fd over plain SQL for production size. Enables parallel restore.pg_dump off-peak or from standby. Reduce primary load.archive_mode or pgBackRest for PITR-capable backups. Replication alone is insufficient.pg_stat_archiver.failed_count. Archive failures silently widen RPO.ls -l on files.RESTORE_RTO_SECONDS every verify run. Prove leadership RTO claims.Daily pg_dump -Fc, weekly verify restore, archive_mode if PITR required.
pgBackRest for large PITR; keep periodic pg_dump for table-level recovery speed.
Pause non-critical dumps during Patroni failover; physical tools often tolerate leader change if configured for standby backup.
Enable automated backups and test restore to new instance quarterly; still export logical for object restore if needed.
Extend retention for held datasets; see Data Retention & Legal Holds.
Stack versions: This page was written for PostgreSQL 18.4 (stable 18, maintenance 17), pgvector 0.8+, PgBouncer 1.x, Patroni 3.x, and PostGIS 3.5+.
Reviewed by Chris St. John·Last updated Jul 18, 2026