PostgreSQL Backup & Recovery

Base Backup

Understand what a PostgreSQL base backup is, how it works with WAL archives, and how to test it for real recovery readiness.

Definition

A consistent physical copy of a PostgreSQL cluster, typically taken with pg_basebackup, used with archived WAL for PITR.

What a Base Backup Captures

A base backup is a physical copy of a PostgreSQL cluster at a consistent point in time.

It provides the starting state for recovery, while WAL replay brings the cluster forward.

Without a recent base backup, recovery windows can become operationally unacceptable.

How It Fits in Real Recovery

Base backup + WAL archives are required for PITR.

Without regular restore drills, backup success does not equal recovery success.

Production teams should measure restore time against target RTO every month.

Operational Checklist

  • Run backups on a predictable cadence
  • Validate backup integrity and retention
  • Test restore timing against RTO targets

Frequently Asked Questions

What is a PostgreSQL base backup?
It is a physical, consistent copy of the cluster used as a foundation for full restore and PITR workflows.
Is a base backup enough without WAL archives?
Only for recovery to backup time. Point-in-time recovery requires WAL history after that backup.
How often should base backups run?
Cadence depends on RPO/RTO and data size, but most production systems run regular scheduled backups plus continuous WAL archiving.
How do teams validate base backup quality?
Run full restore drills in isolated environments and verify application-level correctness, not just backup job success.
What usually breaks base-backup recovery?
Missing WAL, retention gaps, credentials drift, and untested runbooks are the most common failure points.