Documentation

Docs / PostgreSQL

PostgreSQL backups: snapshots and restore steps

Snapshots and point-in-time recovery cover different mistakes. This page shows how to turn on continuous backups, read the Restore calendar, choose between restoring in place and into a new database, and understand what recovery cannot do.

Enable continuous backups

Open the database’s Backups view and switch on Continuous backups, then choose a retention window. Point-in-time recovery reconstructs a database at a time you select, using the configured archives, and it needs continuous backups. For a supported Resilis-managed PostgreSQL database, retention is up to 7 days on Hobby and up to 365 days on Pro and Enterprise. You choose the window, up to your plan’s maximum.

Continuous backups must be on before the incident. A restore cannot reach before they were turned on or past the retention window.

Take a snapshot

Snapshots are available on every plan. Take Snapshot in the Backups view queues a manual snapshot, for example just before a risky change. Snapshots also appear on the Restore calendar for the day they were taken.

Read the Restore calendar

The Restore calendar marks days with snapshots in green and days with point-in-time coverage in blue, so you can see what is recoverable before you ask. Click a day, then choose a snapshot from that day or a time inside the point-in-time window. The window is shown next to the time field.

Choose how to restore: in place or into a new database

Under Target, choose how to go back. Restore in place rewinds the live database to the chosen point: your app keeps using the same database, it is temporarily unavailable while the restore runs, and every change after that point is replaced. The Target selector starts on Restore in place, and the button reads Restore. Through an agent, an in-place restore is refused unless it carries an explicit confirmation.

Restore to new database creates a fork and leaves your live database as it was, so you can check what the fork holds and then switch your app over, or copy back only the rows you lost. The button changes to Fork.

Restore in place when the whole database should go back and a short pause is acceptable. Fork when the live database must stay up, or when you want to check the data or recover only some rows.

What recovery does not promise

There is no guaranteed recovery time or recovery point, so rehearse a restore on a staging database once. A restore cannot reach before continuous backups were enabled. Rolling back the app does not restore data, so the two undo buttons are separate. Keep independent copies of data you cannot replace.

Do I need point-in-time recovery, and how far back can I restore?

If your data changes through the day, it is worth having. A nightly backup restores to last night and loses everything since. Point-in-time recovery restores to a minute you choose.

With continuous backups on, Hobby can keep up to 7 days and Pro and Enterprise can keep up to 365 days. A restore cannot reach before continuous backups were turned on or past the retention window, so enable them before you need them.

What is the difference between snapshots and point-in-time recovery?

Snapshots are available on every plan. Point-in-time recovery reconstructs the database at a time you select, using the configured archives, and it needs continuous backups.

On the Restore calendar, days with snapshots are marked in green and point-in-time coverage in blue. Available archives decide which minutes can be restored.

What rollback features should a database offer when an AI agent works on it?

Look for three things: a restore to a chosen minute, a restored copy you can inspect before anything is replaced, and destructive actions that cannot run without a person.

On Resilis, a supported PostgreSQL database with continuous backups can be restored to a chosen minute, in place or into a new database you inspect first, and an in-place restore needs explicit confirmation. An agent cannot delete a database on its own; a person approves every deletion. App rollback is separate and does not restore data, and none of this is a guaranteed recovery time.

Managed PostgreSQL on Resilis

Create a private PostgreSQL database in your project, bind it to your app and turn on continuous backups. The database draws from your runtime credit.

Get started About managed PostgreSQL