Skip to content

Help

Restore a backup

Tested with:Databasezy API v1 · zb CLI 0.1

You can restore any completed backup in two ways. Into a new instance (the default) leaves the original untouched, so you can check the data first and copy back only what you need. In place overwrites the original instance; it is available for PostgreSQL, TimescaleDB and Valkey. Start with a new-instance restore unless you are sure. To restore to a moment between backups, see Point-in-time recovery.

If you captured a short-lived volume checkpoint before a change, use the separate checkpoint rollback workflow. It restores that capture’s state in the same instance/cell, interrupts connections and needs an exact-name confirmation and recent MFA for a person session. It does not promise the pre-change backup described for an engine-native backup restore below. Checkpoint deployment and real CSI acceptance remain pending; check instance availability first.

shell
zb backups list <instance_id>

The list shows each backup’s id, kind (scheduled, manual, or pre_change for the backup taken before a change), status, size, label, when it finished and when it expires. In the portal, pick the database in the sidebar’s Database switcher and choose Backups (under Operations): each database’s backups are on its own page. Only backups with status completed can be restored; any other is refused with backup is `failed`; only completed backups can be restored.

shell
zb backups restore <instance_id> <backup_id> --name orders-restored
  • --name names the new instance. Without it, the name is the original’s name with -restore- and a suffix.
  • --size picks a size for the new instance, for example a smaller one to shrink storage.
  • The new instance is created in the same project, gets its own host, and counts against your plan’s instance and storage limits like any new instance.
  • You need permission to restore backups and to create instances in that project.

When the new instance is ready, open its Connect page for its host and credentials. To copy data back into the original, use zb migrate --from <restored_id> --to <original_id>. See Backups, restore and PITR.

Free plan: the Free plan allows one instance, so a restore into a new instance is refused. Use an in-place restore instead (PostgreSQL, TimescaleDB and Valkey), or upgrade.

shell
zb backups restore <instance_id> <backup_id> --in-place

The CLI asks you to type the instance’s name (or pass it with --confirm <name>). Then a backup of the current state is taken first, the database is stopped, restored and started again, and checked. The estimated downtime is shown when the restore starts. --in-place cannot be combined with --name or --size.

In-place restore is available for PostgreSQL, TimescaleDB and Valkey. Other engines are refused with in-place restore is not supported for <engine> yet; restore into a new instance. The instance must be running: a paused instance is refused with instance is `paused`; in-place restore needs a running instance. Resume it first.

shell
zb backups restores <instance_id>

This lists restores with their mode, target instance and status. In the portal, each restore has its own page under Backups. The restore is finished when its status is completed and the target instance is ready.

ErrorWhat to do
an instance named `...` already exists in this projectPick another --name
A 422 about instances or storage_gbYour plan’s instance or storage limit is reached. Delete an unused instance, restore in place, or upgrade
type the instance name ... to confirm an in-place restoreThe confirmation did not match the name exactly
403 with a missing permissionAsk an organization owner or admin for the restore permission. See Teams, roles and permissions

A restore brings back the data as it was when that backup was taken. Changes made after the backup are not in it. Engines back up in different ways (for example logical dumps for MySQL and MongoDB, snapshots for others); each engine’s page lists its method. See the engine catalogue.

Backups of a deleted instance are kept for a period that depends on your plan (see Backups, restore and PITR). If you need one, open a ticket quickly and include the deleted instance’s id.

Search the help center or ask the assistant in the portal Help panel. If that does not solve it, open a support ticket from the portal (Help → Open a ticket). Include the instance id, the backup id, the restore id if there is one, the region, the exact error text, and the time it happened in UTC. Never paste passwords, connection strings with passwords, API keys or patient data (PHI) into a ticket. See How to get help.