← All guides

Restoring a Neon database: PITR, branches, and dumps

Neon gives you three restore paths — point-in-time restore, branching from history, and plain pg_restore. When to use which.

Branch from a point in time

Neon's killer feature: create a branch at a past timestamp and inspect it without touching production.

neon branches create --project-id <id> \
  --parent-timestamp "2026-07-04T02:00:00Z" --name incident-inspect

Point a client at the branch, verify the data is good, then either promote it or copy the damaged rows back.

Mind the history window

PITR only reaches as far back as your plan's history retention (hours on free, up to 30 days on paid). Corruption older than the window — the subtle kind that takes weeks to notice — needs an archived logical backup instead.

Restoring a dump into Neon

pg_restore --no-owner --no-privileges --jobs=4 \
  --dbname "$NEON_URL" backup.dump

Use a fresh database or branch as the target so a partial restore can't half-overwrite production.

Whatever tool made your backup, the only way to know it works is to restore it. Firedrill does that automatically for every backup — or try a one-off free drill on a dump you already have.

A backup you've never restored is a hope, not a backup.

Firedrill restore-tests every backup it takes — on real infrastructure, with the report to prove it.