PostgreSQL backup validation

A PostgreSQL base backup without matching WAL may contain all files yet still lack a consistent recovery point.

Modern pg_basebackup output can include a backup manifest with file sizes and checksums. pg_verifybackup can identify changed, missing or unexpected files, but a clean file inventory alone does not replace the WAL needed to make the backup transactionally consistent.

Understand the symptom

A physical backup combines copied data files with the WAL interval that brackets the backup.

WHY

What is happening

Verification checks the manifest and, when possible, the WAL range recorded for the backup. Recovery must confirm the backup start and end records, tablespace mappings, file checksums, timeline history and required WAL segments. A missing segment can prevent crash recovery even when most relation files are readable.

What you may see

Symptoms that change the recovery path.

01

pg_verifybackup reports missing files

A file listed in the manifest is absent, changed or unreadable.

02

Required WAL segment was removed

Startup reaches a gap before the backup can become consistent.

03

Tablespace path is incomplete

The base directory exists but an external tablespace was not preserved.

04

Backup ended unexpectedly

The manifest, backup_label or end-of-backup record may be incomplete.

Protect the source

Actions that can make the situation worse.

01

Forced startup can modify the only copy

PostgreSQL may write recovery state before the backup's consistency is proven.

02

Manifest edits erase evidence

Changing expected checksums or file lists masks what was actually captured.

03

Mixing timelines creates false continuity

WAL from another timeline or cluster cannot safely fill an apparent filename gap.

Do this now

Safe steps before evaluation.

01

Freeze the backup set

Make a read-only copy and stop retention jobs from deleting archives.

02

Save verification output

Record every missing, extra, checksum-failed and WAL-related message.

03

Collect the complete chain

Preserve manifest, base files, tablespaces, WAL, timeline history, configuration and encryption material.

04

Identify the recovery objective

Document the required database, tables and time so alternatives can be prioritized.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Backup inventory

NEPFOSYS correlates the manifest, file tree, tablespaces, checksums and PostgreSQL version.

02

WAL continuity analysis

Required segments, timelines and available archives are mapped before recovery is attempted.

03

Isolated restore validation

The backup is tested on a protected copy and priority data is checked at the latest defensible point.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

Does pg_verifybackup guarantee the database will start?

No. It validates the backup against its manifest and checks available WAL, but successful recovery also depends on complete compatible WAL and server context.

Can I regenerate a missing backup manifest?

A new inventory would not prove what the original backup contained at its recovery point. Preserve the original evidence and use other backups or WAL where possible.

Can one missing WAL file be skipped?

Physical recovery requires an unbroken sequence to the selected consistent endpoint. A gap cannot be assumed harmless.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case