Restore a virtual machine from snapshot or backup.

post/backup-recovery/v1beta1/virtual-machines/{id}/restore

Restores a virtual machine from the selected snapshot or backup.

Securitybearer
Request
path Parameters
id
required
string

UUID string uniquely identifying the virtual machine

Example: 9b4c14a6-3cd5-4907-97c4-cf44c5b641e4
Request Body schema: application/json
required
backupId
required
string

UUID string uniquely identifying the backup. Mandatory if the restore is from a backup.

restoreType
required
string

Specifies the type of restore that needs to be performed.

Enum: "PARENT" "ALTERNATE"
snapshotId
required
string

UUID string uniquely identifying the snapshot. Mandatory if the restore is from a snapshot.

object

Provides the details about the target VM location, compute, etc These inputs are required only if the restore type is 'ALTERNATE'.

Responses
202

Accepted

400

Bad request

401

Unauthorized

403

Forbidden

409

Conflict

412

Precondition failed (if the generation number is invalid)

500

Internal / unexpected error

Request samples
application/json
{
  • "backupId": "9b4c14a6-3cd5-4907-97c4-cf44c5b641e4",
  • "restoreType": "PARENT",
  • "snapshotId": "9b4c14a6-3cd5-4907-97c4-cf44c5b641e4",
  • "targetVmInfo": {
    }
}
Response samples
application/json
{ }