Skip to content

Restore VM Snapshot

POST
/notebooks/{Instance_id}/snapshots/{snapshot_id}/restore/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/snapshots/{snapshot_id}/restore/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>'

Replaces the Virtual Machine’s disk with the snapshot. Everything written since the snapshot was taken is lost. The VM stops, gets a disk built from the snapshot, and starts again, so it is offline for a short time. Only a snapshot whose status is ready can be restored. Follow the restore with List VM Snapshot Restores.

Instance_id
required
integer

Instance ID

snapshot_id
required
integer

Snapshot ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Restore started. When the snapshot is gone from the cluster but a copy of it is in object storage, the restore starts from that copy instead: the message is Restore from object storage started and data holds only id, the restore’s ID.

Media typeapplication/json
object
code
integer
message
string
data
object
id

The snapshot’s ID.

integer
restore_id

The ID of this restore in the restore list.

integer
errors
object

Example

{
"code": 200,
"message": "VM restore started",
"data": {
"id": 212,
"restore_id": 35
},
"errors": {}
}

The snapshot’s status is not ready.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": "Snapshot is not ready to restore."
}

No snapshot with that ID on this VM.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Snapshot not found."
}

The snapshot is gone from the cluster and has no other copy.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "This snapshot no longer exists on the cluster and has not been copied to object storage, so there is nothing left to restore from."
}