Restore a volume from a recovery point

Restore a volume's recovery point into a new volume, or over the source volume, from the backup plan's page or through the REST API.

Restore one recovery point of one volume at a time: into a new volume, which leaves the source volume untouched, or over the source volume. A plan backs up each of its volumes separately, so the recovery points of different volumes don't form a consistent set across volumes.

Before you begin

  • You need the Owner or Contributor role, or a custom role with Manage access to Block & Object Storage, on the subscription or on the project.
  • Your subscription must be active.
  • The recovery point's plan must still exist. After a plan is deleted, its recovery points can't be restored from the console or through the REST API.
  • A restore into a new volume needs a region that offers Block Storage volumes, and the new volume counts toward the subscription's quota and the project's allocation of Volumes and Volume Storage.

Restore into a new volume

In the console, go to StorageBackup Center, and select the plan.

Select the Volumes tab.

On the volume's row, select Recovery points.

In the list, find the recovery point by its capture time, type, size, expiry, and status, and select Restore….

Under Restore target, keep New volume.

In New volume name, keep the suggested name, which is the volume's name followed by -restored, or enter another name.

Select Start restore.

You can also open a volume's recovery points directly: in Backup Center, on the Protection coverage tab, select View plan in the volume's row menu, or select Restore on the plan page on the volume's Backups tab.

SettingRules
New volume name1 to 255 characters. It can't start or end with a space, and it can't contain line breaks or other control characters, or characters outside the Basic Multilingual Plane. It must be unique among the project's volumes.

Result

The new volume appears in StorageVolumes as Creating and becomes Available when the restore finishes. It has the size of the source volume. The source volume doesn't change and can stay attached.

To use the data, attach the new volume to an instance. See Attach and detach a volume.

Restore over the source volume

Caution

A restore over the source volume replaces all its data with the data of the recovery point. Everything written to the volume after the recovery point was captured is lost, and you can't undo the restore.

Detach the volume from its instance, and wait until its status is Available. See Attach and detach a volume.

Open the volume's recovery points as described above, and select Restore… on the recovery point.

Under Restore target, select Over the source volume.

Select Start restore.

The restore doesn't detach the volume for you: while the volume isn't Available, the console shows a warning and doesn't start the restore. The volume keeps its ID and its name.

An instance's boot volume can't be detached while the instance exists, so restore a boot volume into a new volume instead.

Restore through the API

The plan's page lists recovery points only for the volumes that are assigned to the plan. To restore a recovery point of a volume that you removed from the plan, or of a volume that was deleted, use the REST API. You need an API token with the storage:read scope to list recovery points and the storage:write scope to restore, in the environment variable PC_TOKEN.

Find the plan's ID, under Plan ID on the plan's page, and the volume's ID, which the plan's run results show next to the volume's name. See Per-volume results.

List the volume's recovery points:

List a volume's recovery points
curl "https://<api-host>/api/v1/scopes/<project-id>/storage/backup-plans/<plan-id>/volumes/<volume-id>/restore-points" \
  -H "Authorization: Bearer $PC_TOKEN"

The response lists the recovery points in data, newest first, each with its id, kind, status, sizeGb, protectedAt, and expiresAt.

Restore one into a new volume:

Restore into a new volume
curl -X POST "https://<api-host>/api/v1/scopes/<project-id>/storage/backup-plans/<plan-id>/volumes/<volume-id>/restore-points/<restore-point-id>/actions/restore" \
  -H "Authorization: Bearer $PC_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"target":"new","name":"<new-volume-name>"}'
  • <api-host>: the host name of the API. See URL structure.
  • <project-id>: the ID of the project. See Find a project's ID.
  • <plan-id>, <volume-id>, <restore-point-id>: the IDs from the previous steps.
  • <new-volume-name>: the name of the new volume. If you leave out name, the volume is named after the source volume, followed by -restored.

The request returns 202 Accepted with an operation that tracks the restore. For the request formats, see GET/scopes/{scopeId}/storage/backup-plans/{planId}/volumes/{volumeId}/restore-points and POST/scopes/{scopeId}/storage/backup-plans/{planId}/volumes/{volumeId}/restore-points/{restorePointId}/actions/restore. After the plan is deleted, both requests return 404 Not Found.

Follow a restore

A restore runs in the background. If the request is refused before the copy starts, for example because another volume has the name, the plan's Activity tab shows the failed operation and its reason. If the copy fails, the target volume changes to Error: the new volume, or the source volume for a restore over it.

Troubleshooting

SymptomCauseResolution
In-place restore needs a detached, settled volume. “<volume>” is <status> — restore into a new volume instead.The source volume is attached, or it isn't settled.Detach the volume and wait until it's Available, or restore into a new volume.
The plan's Activity tab shows "a volume named '<name>' already exists in this scope; choose another name for the restored volume"Another volume in the project has the name.Restore again with another name.
The new volume, or the source volume after a restore over it, is ErrorCopying the recovery point failed.Restore the recovery point into a new volume, or restore another recovery point. Delete a failed new volume when you no longer need it.
Couldn’t start the restore into “<name>” or Couldn't start restore of “<volume>”The request was refused, for example because the subscription is paused.Restore again after the subscription is resumed.

On this page