This is an archive version of the document. To get the most up-to-date information, see the current version.

(POST) /vmRestorePoints/{ID}?action=restore

In this article

    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
    Restore

    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
    Restore

    Boolean

    Specifies if the VM must be powered on after the restore process is complete.

    Yes

    1/1

    HierarchyRoot
    Uid

    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

    VMs Restore Parameters

    VM restore parameters are provided in the following format:

    <VmRestoreParameters>
     <VmRestorePointUid>urn:veeam:VmRestorePoint:48c8cd65-d5fa-4ca6-8a98-d3fde641086e</VmRestorePointUid>
     <VmNewName>vmTestSize</VmNewName>
     <DatastoreRef>urn:vCloud:Datastore:fa099d3b-7376-49b1-884c-bb6fa47c7b1e.urn:vcloud:datastore:68d9f62d-f3c1-4842-8ad6-9b7faca3c92a</DatastoreRef>
     <OrgVdcStorageProfileRef>urn:vCloud:OrgVdcStorageProfile:fa099d3b-7376-49b1-884c-bb6fa47c7b1e.urn:vcloud:vdcstorageprofile:1afeb3cc-bc4f-4e0f-b092-a3f8bbe70adc</OrgVdcStorageProfileRef>
     <LinkedCloneVmTemplateRef/>
    </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"?>
    <RestoreSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <vCloudVmRestoreSpec>
        <PowerOnAfterRestore>false</PowerOnAfterRestore>
        <HierarchyRootUid>urn:veeam:HierarchyRoot:1ed39e5b-06e1-4fbb-a106-52537b5e059e</HierarchyRootUid>
        <vAppRef>urn:vCloud:Vapp:1ed39e5b-06e1-4fbb-a106-52537b5e059e.urn:vcloud:vapp:dd549ecd-2421-4492-83af-88af35ea8396</vAppRef>
        <VmRestoreParameters>
          <VmRestorePointUid>urn:veeam:VmRestorePoint:af9396fb-99e6-4e94-a82a-914cc5a3f810</VmRestorePointUid>
          <VmNewName>VM-restored</VmNewName>
          <DatastoreRef>urn:vCloud:Datastore:1ed39e5b-06e1-4fbb-a106-52537b5e059e.urn:vcloud:datastore:9cfafa2e-e57b-4bc5-9690-933947c62b80</DatastoreRef>
          <OrgVdcStorageProfileRef>urn:vCloud:OrgVdcStorageProfile:1ed39e5b-06e1-4fbb-a106-52537b5e059e.urn:vcloud:vdcstorageprofile:7e7ffe3a-33fa-4f9e-805b-c08b1a3645bf</OrgVdcStorageProfileRef>
          <LinkedCloneVmTemplateRef/>
        </VmRestoreParameters>
      </vCloudVmRestoreSpec>
    </RestoreSpec>

    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"?>
    <RestoreSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <VmRestoreSpec>
       <PowerOnAfterRestore>false</PowerOnAfterRestore>
       <QuickRollback>false</QuickRollback>
     </VmRestoreSpec>
    </RestoreSpec>

     

    Response:

    202 Accepted

     

    Response Body:

    <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
     <Links>
       <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
     </Links>
     <TaskId>task-1</TaskId>
     <State>Running</State>
     <Operation>StartVMRestore</Operation>
    </Task>

    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">
     <Links>
       <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
       <Link Rel="Related" Type="RestoreSession" Href="http://localhost:9399/api/restoreSessions/d67d532a-9ce2-43b8-88c6-90354f2f8727?format=Entity" />
     </Links>
     <TaskId>task-1</TaskId>
     <State>Finished</State>
     <Operation>StartVMRestore</Operation>
     <Result Success="true">
       <Message>Ok</Message>
     </Result>
    </Task>