Help
Preview a point in time before restoring
Tested with:Databasezy API v1 · zb CLI 0.1
A restore preview answers “what did this table look like at 10:42?” before you restore anything. It recovers your database as it was at a moment inside its point-in-time recovery window into a separate, read-only copy. You query that copy in the console, and then choose one of three things:
- Restore in place: replace your database’s data with its state at that moment.
- Keep as instance: turn the preview into a normal, writable database next to the original.
- Discard: delete the preview. Nothing else changes.
Previews are available for PostgreSQL and TimescaleDB on instances that have a point-in-time recovery window (Enterprise, or Solo and Team with the point-in-time recovery add-on). Other engines answer “not supported yet”: restore a backup into a new instance instead.
Open a preview
Section titled “Open a preview”In the portal, open the database, then Backups → Preview a point in time. Pick a date and time (UTC) inside the window shown, choose how long to keep the preview (1 to 24 hours, 4 hours by default) and select Preview this point in time.
With the CLI:
zb backups preview create <instance_id> --at 2026-10-16T10:42:00Z --ttl 4hzb backups preview list <instance_id>zb backups preview show <instance_id> <preview_id>The preview is restored from the nearest backup before that moment plus the write-ahead log archive. This usually takes a few minutes; the status changes from Restoring to Ready.
Query it
Section titled “Query it”When the preview is ready, select Open in console (read-only). Every console session on a preview is read-only, whatever your role: statements run as the database’s read-only role, which can only read tables. Its credentials are never shown, so nobody can connect to it with a writable login, and features that write (extensions, schema changes, branches, a new TTL) are refused while it is a preview.
Then choose
Section titled “Then choose”| Action | What happens | CLI |
|---|---|---|
| Restore in place | Your database’s data is replaced with its state at the preview’s moment. You type the database name to confirm; a pre-change backup is taken first and the database is unavailable while it restores. The preview is then discarded. | zb backups preview restore <instance_id> <preview_id> |
| Keep as instance | The preview becomes a normal, writable database. It stops expiring and is billed like any database from then on. The original is not changed. | zb backups preview promote <instance_id> <preview_id> |
| Discard | The preview is deleted now. The original and its backups are not changed. | zb backups preview discard <instance_id> <preview_id> |
If you do nothing, the preview is deleted automatically when its time runs out.
Cost and limits
Section titled “Cost and limits”- A preview is billed per minute at the compute and storage price of its size, like a branch, from when it is requested until it is discarded, expires or is kept. The Backups page shows the price per minute.
- It counts toward your plan’s database limit while it exists.
- One open preview per database at a time. Discard or keep it to open another.
- A preview of a database on secure hosting is always created on secure hosting too.
- A preview cannot itself be previewed or branched.
Errors
Section titled “Errors”| Error | Meaning |
|---|---|
402 plan_limit | The plan has no point-in-time recovery window. Add the point-in-time recovery add-on or upgrade |
422 target_time: outside the ... window / must not be in the future | Pick a moment inside the window the page shows |
422 target_time: no completed backup at or before this point in time ... | The window has no backup before that moment to start from; pick a later time |
422 engine: restore previews are not supported yet for ... | Only PostgreSQL and TimescaleDB have previews |
409 this instance already has an open restore preview | Discard or keep the open preview first |
409 this instance is a read-only restore preview | You tried to write to a preview (reveal credentials, change it). Keep it as an instance first |