Announcing Point-in-Time Restore
Neon's Branch Restore feature, now in the Neon Console, restores a Postgres branch to any LSN or timestamp within a configurable history retention window of up to 30 days. This is possible because Neon's separated storage and compute retain WAL history. Time Travel Assist lets you query the database as it was at a chosen point before committing, so you can pinpoint when data loss happened. Restores take a few seconds and briefly drop connections, much like a cold start. The post contrasts this with self-managed approaches: pg_dump offers no point-in-time recovery, while pg_basebackup with WAL archiving, pgBackRest or Barman can do it but cost operational effort.
Related posts
- Using Neon branching for instant Point in time recovery
Neon mediumAdept
Neon's copy-on-write branching can restore a Postgres database to an earlier point in time by creating a branch from a timestamp or LSN within the retained WAL history window (seven days by default). Creating the branch from the console gives you a new compute endpoint and so a new connection string. To keep the existing connection string, a TypeScript script using the Neon API client creates an endpoint-less branch at the target timestamp, reassigns the existing compute endpoint to it, and sets it as the primary branch. Afterward, rename the old branch and delete its data to avoid storage charges.
- Point In Time Recovery Under the Hood in Serverless Postgres
Neon mediumAdept
Neon implements point-in-time recovery by treating Postgres as its WAL. WAL is streamed to Paxos-backed Safekeepers, then to multi-tenant Pageservers that build immutable image and delta layers keyed by key range and LSN. The post contrasts this with traditional Postgres PITR, which needs base backups, WAL archiving, tools like Barman and a standby server. Neon's GetPage@LSN instead rebuilds any page at any LSN on demand. Time Travel Assist uses this through ephemeral copy-on-write branches with a 10-second TTL, so you can query a past state before restoring.
- Time Travel with Serverless Postgres
Neon mediumAdept
Neon's copy-on-write database branching can recover from accidental data loss by creating branches at a past point in time or at a specific Postgres WAL Log Sequence Number (LSN). When the exact moment of a destructive query is unknown, you can binary-search the LSN range between a known-good branch and the current state. A Python script uses the Neon API to create a branch at each midpoint, run a validation query, and delete the branch. It converges on the exact LSN where the data broke, and you then branch from that point to restore.
- Inside branch-based restores in Lakebase Postgres
Neon mediumAdept
Lakebase Postgres turns point-in-time restore into a metadata operation: creating a branch at a timestamp that points at existing immutable page history, rather than provisioning an instance, hydrating a snapshot from S3 and replaying WAL. Compute is decoupled from storage, which is split into safekeepers (quorum WAL durability), a pageserver that reconstructs any page at any LSN, and object storage holding immutable image and delta layers. As a result, restore time stays near-instant whether the database is 10 GB or 100 TB, past states can be queried before committing to a restore, and the operation is cheap enough for agent platforms to build undo and checkpoint features on.
- I Dropped a Table in Production—Now What?
Neon mediumAdept
Neon's instant point-in-time recovery creates a new copy-on-write branch at a moment just before a dropped table. That branch is available in about one second regardless of database size, and production keeps running while it is created. Two recovery routes follow from this. One is to pg_dump the table out of the recovered branch and import it into production, which keeps all data written after the drop. The other is to use Branch Restore to swap production onto the recovered branch under the same connection string, which discards post-drop writes. RDS, by contrast, restores a snapshot to a new instance and replays WAL, which can take hours for multi-terabyte databases.