Skip to main content
Closed beta. Restoring a service is part of Managed services, which is in closed beta and enabled per organisation on request. Contact support to have it turned on for your organisation.
Restoring a managed PostgreSQL service creates a new service from the backups of another one. You choose a moment, or leave it out to get the newest point the backups reach. The service you restore from is not changed, so you can check the restored data before any application uses it, and nothing is lost if the moment turns out to be the wrong one. There is no restore over a running service. To go back in time you create the restored service beside the original, move your applications to it, and delete the original when you no longer need it.

Before you start

  • The service you restore from has been backed up. It is protected into a backup vault and has at least one restore point with the status Complete. ankra cluster stacks restore-points list <service> lists them. The service itself can be deleted, or on a cluster that no longer exists: what matters is that its backups are still in the vault.
  • The vault still exists, and the new service backs up into the same one. A restored service reads the other service’s backups with the access its own backups use, so you do not choose a vault: the plan names it as Backup vault.
  • You set up postgresql version 1.10.0 or later. Earlier versions of the package cannot start from a backup, and setup refuses them.
  • The new service’s cluster can run a new PostgreSQL service: the native deployment engine, a default StorageClass and Kubernetes 1.30 or later. It can be the cluster the original runs on, or another one.
  • Your role allows it:
The built-in owner, admin and operator roles hold all of them. See Roles and access.

Choose the moment

Ankra accepts a moment it can confirm from the restore points it has: from a few minutes after the oldest kept restore point completed to the time the newest backup started. A daily schedule with seven days of retention gives you any moment in roughly the last week, up to the start of last night’s backup. Taking a restore point first works because a backup that completes proves the service’s backups reach the time it started. It does not restart a database that already has a complete restore point:
Leaving the moment out gives you everything that has reached the vault, and that trails the database by up to five minutes: PostgreSQL sends its log to the vault one segment at a time, when the segment is full or after five minutes. If the change you need was made in the last few minutes, take a restore point first. A service with a single restore point has no moment to name yet. Leave the moment out, or take a second restore point: a moment from five minutes after the first one completed can then be named. Write the moment in RFC 3339 with its time zone, for example 2026-11-18T09:30:00Z or 2026-11-18T10:30:00+01:00.

Restore the service

The portal has no restore action yet. Use the CLI or MCP.
--from takes the name or id of the service to restore from. Leave --at out for the newest point its backups reach. Size the new service with --param, as for any setup: give it at least the storage the original uses.The command prints the plan before anything is set up. Check the Created from line: it names the service, the moment, and what the platform will do. Then answer the question, or pass --yes. --review-only stops after the plan and prints the command that confirms it.--consumer is not accepted with --from: a restored service starts with no applications.
The new service is installed like any other. Within a few minutes Ankra gives it the storage access its own backups use, which is what the recovery reads with, and then PostgreSQL replays the backups up to the moment. How long that takes depends on the size of the database and on how much was written between the backup and the moment. Once the recovery is complete and the database is up, Ankra switches on the new service’s own backups. That restarts the database once, so the new service is unavailable for about half a minute shortly after it first becomes ready. Ankra does this by itself only in the first hour after setup. After a recovery that took longer, take a restore point of the new service once it is ready, which switches its backups on:

Verify

Follow the service until its readiness reads ready:
Then look at the data before you connect anything to it. The service’s namespace has its name, its database is app, and a new service’s first pod is postgresql-1:
If the data is not what you wanted, delete the restored service and restore again with another moment. The original is untouched either way.

Connect your applications

Bind the application’s namespace, then connect it to the restored service:
consumers bind prints the consumer id. A namespace that is already bound says so and prints its id. The application receives the connection the way every connected application does. The application’s namespace must be on the restored service’s cluster. An application on another cluster is not connected for you: give it the values as in Connect from another cluster. An application connected to both services keeps reading DATABASE_URL from the one it already used until you disconnect it from the original. Until then it reaches the restored service under that service’s prefixed names only, and the disconnect asks you which service gives DATABASE_URL from then on: the name never moves by itself. When no application uses the original any more, delete it.

What the restored service is

  • A service of its own. It has its own name, namespace, address and owner password. The connection your applications receive from it is new, including its CA.
  • The same roles as the original had. Roles that existed in the original’s database at that moment are restored with the passwords they had then. The plan says so before you confirm.
  • Backed up separately. Its backups start again in a location of its own, in the same vault. They do not continue the original’s.
  • Sized by you. Its storage, memory and number of instances come from the setup, not from the original.

Troubleshooting

Setup refuses before anything is installed, and says why. Most refusals name the service you restore from.

Next steps

Backups and restore points

Protect a Stack, take restore points and read what they hold.

Connect to a managed service

How an application receives a service’s connection.