Take and restore snapshots
Take a snapshot of a PostgreSQL cluster, restore it in place, restore to a point in time, and delete snapshots — in the portal or with the CLI.
Requires: postgrescluster/createSnapshot, postgrescluster/restoreSnapshot
Snapshots need backups to be on — see Turn on backups. They are on the cluster's Snapshots tab.
| Task | Needs | Built-in roles |
|---|---|---|
| See snapshots and the recovery window | postgrescluster/read |
every role that can see the cluster |
| Take a snapshot | postgrescluster/createSnapshot |
Owner, Contributor, Databases Operator, Platform Owner, Platform Contributor |
| Restore or delete a snapshot | postgrescluster/restoreSnapshot, postgrescluster/deleteSnapshot |
Owner, Databases Operator, Platform Owner, Platform Contributor |
Take a snapshot
- On the Snapshots tab, choose Take snapshot.
- Give it a Description, if you like. Keep for has no effect on a PostgreSQL snapshot — see Retention.
- Choose Take snapshot. The cluster keeps running; the snapshot is In progress until it is Completed.
A snapshot is refused, with the reason, when backups are off or the cluster reports that archiving is failing. Before the cluster reports that, a snapshot is accepted but stays In progress.
stsh pg snapshot create orders-db --description "before the migration"
stsh pg snapshot list orders-dbRestore a snapshot
- Choose Restore on a Completed snapshot.
- Restore this snapshot? says what happens: the cluster is recreated from the backup, with a few minutes of downtime; the connection string, the service names and the password stay the same.
- Type the cluster's name to confirm, and choose Restore.
Follow the restore on the cluster's Operations tab. Everything written after the snapshot is gone once it completes — see What a restore does. With external access on, the external address can change.
Caution
Prefer a snapshot taken by hand. The restore removes the scheduled snapshots with the old cluster, and a restore of a scheduled snapshot can end with no cluster — see What a restore does.
stsh pg snapshot restore orders-db <snapshot-id>The CLI asks before it starts, and waits for the restore to finish unless you pass --no-wait.
Restore to a point in time
Once the archive holds a completed snapshot, the tab reads "Snapshots plus a continuous archive since …" and offers Restore to point in time.
- Choose Restore to point in time.
- Under Restore to, pick the moment, in your browser's time zone. It must lie inside the recovery window: after the time the tab names, and not in the future.
- Type the cluster's name to confirm, and choose Restore.
The portal always starts from the newest completed snapshot and replays the archive forward from it, so pick a moment after that snapshot completed. To reach a moment before it, use the CLI and name a snapshot that completed before that moment:
stsh pg snapshot restore orders-db <snapshot-id> --at 2026-09-15T08:30:00Z--at takes a time such as 2026-09-15T08:30:00Z. A time before the start of the current
archive, or in the future, is refused. A time before the named snapshot completed is not refused,
but the recovery then fails and the cluster comes back at the newest snapshot of its archive instead
— see What a restore does. The same holds for a moment picked in
the portal before its newest snapshot completed.
Delete a snapshot
Choose the bin icon on the snapshot, then Delete. The snapshot leaves the list; its data stays in the archive until retention removes it, so deleting one frees no space at once.
stsh pg snapshot delete orders-db <snapshot-id>