(POST) /vmRestorePoints/{ID}?action=restore
Starts the full VM restore process from the restore point having the specified ID.
Request
To start the full VM restore, you need to send the POST HTTP request to the /vmRestorePoints/{ID}/?actions=restore URL.
HTTP Request
POST http://<Enterprise-Manager>:9399/api/vmRestorePoints/{ID}?action=restore |
Request Headers
The request contains the following headers:
Header | Required | Description |
X-RestSvcSessionId | True | The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. To learn more, see Authentication and Security. |
Request Body
In the request body, the client must send the parameters for the full VM restore process. The body of the request must conform to the XML Schema Definitionem_rest_ of Veeam Backup Enterprise Manager RESTful API.
Depending on the platform on which the restored VM is created, the request body may contain different elements.
For VMware and Hyper-V platforms, the request body must contain the following elements:
Element | Type | Description | Modifiable | Min/Max Occurrence |
PowerOnAfter | Boolean | Specifies if the VM must be powered on after the restore process is complete. | Yes | 1/1 |
QuickRollback | Boolean | Specifies if Veeam Backup & Replication must use the incremental restore functionality to recover the VM. During incremental restore, Veeam Backup & Replication queries CBT to get data blocks that are necessary to revert the VM to an earlier point in time, and will restore only these data blocks from the backup. Incremental restore significantly reduces the restore time and has little impact on the production environment. | Yes | 1/1 |
For the vCloud Director platform, the request body must contain the following elements:
Element | Type | Description | Modifiable | Min/Max Occurrence |
PowerOnAfter | Boolean | Specifies if the VM must be powered on after the restore process is complete. | Yes | 1/1 |
HierarchyRoot | UID | ID of the host on which the VM should be restored, for example: urn:veeam:HierarchyRoot:fa099d3b-7376-49b1-884c-bb6fa47c7b1e. | Yes | 1/1 |
VmsRestoreParameters | vCloudVmRestoreParametersInfo | Defines VM-specific parameters. | No | — |
VM restore parameters are provided in the following format:
<VmRestoreParameters> |
You can define the following restore parameters for VMs:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
VmRestorePointUid | UID | ID of the restore point from which the VM should be restored, for example: urn:veeam:VmRestorePoint:48c8cd65-d5fa-4ca6-8a98-d3fde641086e. | Yes | 1/1 |
VmNewName | String | Name of the restored VM. If this parameter is not specified, the VM is restored with its initial name. | Yes | 0/1 |
DatastoreRef | HierarchyObjRef | Reference to the datastore on which VM files should be placed. The reference can be constructed manually or obtained with the lookup service. | Yes | 0/1 |
OrgVdcStorageProfileRef | HierarchyObjRef | Reference to the OrgVdc profile to be used for the restored VM. The reference can be constructed manually or obtained with the lookup service. | Yes | 0/1 |
LinkedCloneVmTemplateRef | HierarchyObjRef | (For linked clone VMs) Reference to the template that was used to create the VM. The reference can be constructed manually or obtained with the lookup service. | Yes | 0/1 |
For example:
<?xml version="1.0" encoding="utf-8"?> |
Query Parameters
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns response code 202 Accepted.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTP headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the request body message: application/xml. |
Response Body
In the response body, Veeam Backup Enterprise Manager returns an ID of the task that has been created to perform the requested action, and the task state. You can check the operation results by sending the GET HTTP request to the URL of the task resource.
Additionally, Veeam Backup Enterprise Manager returns a link to the task deletion operation. You can send the GET HTTP request to the URL in the link to stop the task execution.
Example
The example below restores a VM from the restore point having ID b32c22c4-79af-4486-b2e2-1a3897db5c61:
Request: POST http://localhost:9399/api/vmRestorePoints/b32c22c4-79af-4486-b2e2-1a3897db5c61?action=restore
Request Header: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Request Body: <?xml version="1.0" encoding="utf-8"?>
Response: 202 Accepted
Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1"> |
To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:
Request: GET http://localhost:9399/api/tasks/task-1
Request Header: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Response: 200 Success
Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1"> |