Long-term Retention APIs

Zerto's Long-term Retention enables storing data for extended periods, defining Retention policies, and restoring the data with granularity down to the VM level.

The following APIs are described in this section:

Restore VM
Ad-hoc Retention Deletion from Long-term Repository

Restore VM

The Restore VM APIs enables you to restore a VM from a LTR Repository. The VM is restored to the site the API is run on and where the Repository is configured.

To restore a VM, run the following APIs:

1. Get the Existing VMs in a Retention Set
2. Get the Retention Sets for a VM
3. Get the Original Settings for a VM in a Retention Set
4. Restore a VM

Get the Existing VMs in a Retention Set

v1/ltr/catalog/vms returns a list of available VMs in a Retention Set.

Method URL
GET https://zvm_ip:port/v1/ltr/catalog/vms

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
Request Body Using JSON Format

The request body is empty.

HTTP Response in JSON Format

The following is an example response JSON body for https://zvm_ip:port/v1/ltr/catalog/vms:

{

  "Vms": [

  {

    "IsSearchable": Boolean,

    "Vm": {

        "Identifier": "String content",

      "Name": "VM1"

   },

     "Vpg": {

       "Identifier": "String content",

     "Name": "VPG1"

   }

  }

 }

}

Where:

Vms
Identifier The unique LTR identifier of the virtual machine.
Name The name of the virtual machine.
IsSearchable (Boolean: true/false) Whether or not the VM was indexed when the Retention Set ran.
Vpg  
Identifier The LTR identifier of the VPG.
Name The name of the VPG.

Get the Retention Sets for a VM

v1/ltr/catalog/vms/{LTRVmIdentifier}/retentionsets returns a list of the available Retention Sets for a VM in all repositories in the site.

Method URL
GET https://zvm_ip:port/v1/ltr/catalog/VMs/{LTRVmIdentifier}/retentionsets

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
{LTRVmIdentifier} The unique LTR identifier of the virtual machine.
Request Body Using JSON Format

The request body is empty.

HTTP Response in JSON Format

The following is an example response JSON body for https://zvm_ip:port/v1/ltr/catalog/vms/{LTRVmIdentifier}/retentionsets:

{

  "LTRVmIdentifier": "String content",

  "RetentionSets": [

     {

       "IsApplicationAware": Boolean,

       "NumberOfVolumes": Value,

       "RepositoryIdentifier": "String content",

       "RetentionSetIdentifier": "String content",

       "TimeStamp": "Value",

       "ZorgIdentifier": "String content"

      }

   ]

}

Where:

LTRVmIdentifier The unique LTR identifier of the VPG.
IsApplicationAware (Boolean: true/false) Whether or not this VM in this Retention Set is application aware.
NumberOfVolumes The number of volumes that were retained in the Retention Set for this VM.
RepositoryIdentifier The identifier of the repository where the Retention Set is stored.
TimeStamp The date and time at which the Retention Set ran. Example: 2020-06-04T09:08:18.000Z
ZorgIdentifier The Zerto organization for which the retention set was created, for ZCM sites.

Get the Original Settings for a VM in a Retention Set

v1/ltr/catalog/VMs/{LTRVmIdentifier}/retentionsets/{RetentionSetIdentifier}/settings returns the original settings of the VM as it was configured in the VPG when the Retention Set ran.

Method URL
GET https://zvm_ip:port/v1/v1/ltr/catalog/VMs/{LTRVmIdentifier}/retentionsets/{RetentionSetIdentifier}/settings

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
{LTRVmIdentifier} The unique LTR identifier of the VPG.
{RetentionSetIdentifier} The unique identifier of the Retention Set. To get the RetentionSetIdentifier, see
Request Body Using JSON Format

The request body is empty.

HTTP Response in JSON Format

The following is an example response JSON body for https://zvm_ip:port/v1/v1/ltr/catalog/VMs/{LTRVmIdentifier}/retentionsets/{RetentionSetIdentifier}/settings:

{

   "HostIdentifier": "String content",

   "LTRVmIdentifier": "String content",

   "Nics": [

     {

      "DnsSuffix": "String content",

      "Gateway": "String content",

      "IsDhcp": Boolean,

      "NetworkIdentifier": ""String content"",

      "PrimaryDns": "String content",

      "SecondaryDns": "String content",

      "ShouldReplaceMacAddress": Boolean,

      "StaticIp": "String content",

      "SubnetMask": "String content"

     }

  ],

  "RepositoryIdentifier": "String content",

  "RetentionSetIdentifier": "String content",

  "Volumes": [

    {

     "DatastoreIdentifier": "[String content, server String content]",

     "IsThin": Boolean,

     "VolumeIdentifier": "Value"

    },

 {

     "DatastoreIdentifier": "[Datastore String content, server String content]",

     "IsThin": Boolean,

     "VolumeIdentifier": "Value"

  }

 ]

}

Where:

HostIdentifier The unique identifier of the host that the VM will be restored on.
LTRVmIdentifier The unique identifier of the virtual machine in the Retention Set.
NICs Information about NICs used by the virtual machine in the Retention Set.
RepositoryIdentifier The unique identifier of the repository where the Retention Set is stored.
RetentionSetIdentifier The unique identifier of the Retention Set.
Volumes Information about the volumes used by the virtual machine.
DatastoreIdentifier Unique identifier of the datastore used by the virtual machine.
IsThin

(Boolean: true/false)

True: The volumes of the VM will be restored as thin-provisioned.

False: The volumes of the VM will be restored as thick-provisioned.

VolumeIdentifier The identifier of the volume. Example: scsi:0:0

Restore a VM

/v1/ltr/restore/vm restores the VM from the Repository at the recovery site.

Method URL
POST https://zvm_ip:port/v1/v1/ltr/restore/vm

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.

Request Body Using JSON Format

The following is an example of a JSON request body for https://zvm_ip:port/v1/v1/ltr/restore/vm:

{
  "LTRVmIdentifier":"{LTRVmIdentifier}",

  "RetentionSetIdentifier":"{RetentionSetIdentifier}"
}

Where:

LTRVmIdentifier The unique identifier of the virtual machine in the Retention Set.
RetentionSetIdentifier The unique identifier of the Retention Set.
Request Body Using JSON Format

The following is an example of a JSON response for https://zvm_ip:port/v1/v1/ltr/restore/vm:

"{Retention Task ID}"

Where:

{Retention Session ID}

Unique session ID

Ad-hoc Retention Deletion from Long-term Repository

You can manually delete undesired Retention Sets and/or Retention Sets chains, out-of-policy, from the Long-term Repository.

Get Full Retention Sets

v1/ltr/catalog/fullretentionSets returns a list of full Retention sets.

Method URL
GET

https://zvm_ip:port/v1/ltr/catalog/fullretentionSets?repositoryIdentifier={{repositoryIdentifier}}&vpgIdentifier={{vpgIdentifier}}&zorgIdentifier={{zorgIdentifier}}

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
repositoryIdentifier The unique identifier of the repository where the Retention Set is stored.
vpgIdentifier The unique identifier of the VPG.
ZorgIdentifier The Zerto organization for which the retention set was created, for ZCM sites.
Request Body Using JSON Format

The request body is empty.

HTTP Response in JSON Format

The following is an example response JSON body for https://zvm_ip:port/v1/ltr/catalog/fullretentionSets/incrementals?repositoryIdentifier={{repositoryIdentifier}}&vpgIdentifier={{vpgIdentifier}}&zorgIdentifier={{zorgIdentifier}}:

{

     "RetentionSets": [

          {

           "RetentionSetIdentifier": "String content",

                "BackupMethod": "Incremental",

             "Vpg": {

                        "Name": "String content",

                  "Identifier": "VM1"

              },

              "Repository": {

                 "Name": "String content",

                 "Identifier": "String content"

         },

              "Zorg": {

          "Name": String content,

             "Identifier": "String content"

         },

             "PointInTime": "String content",

              "ExpiryDate": "String content",

            "ActionType": "ActionByUser",

           "StatusType": "Full",

           "IsAppAware": Boolean,

             "SizeInKB": Value,

         "AggregatedSizeInKB": Value,

         "NumberOfIncrementals": 0

         }

     ]

 }

Where:

RetentionSetIdentifier The unique identifier of the Retention Set.
BackupMethod The intended Retention method (full, incremental, partial)
Vpg  
Name The name of the VPG.
Identifier The LTR identifier of the VPG.
Zorg  
Name The name of the ZORG (Zerto organization for which the retention set was created, for ZCM sites).
ZorgIdentifier The identifier of the ZORG (Zerto organization for which the retention set was created, for ZCM sites).
PointInTime The Retention process start time (UTC)(format example: 2020-08-06T10:43:36.837Z)
ExpiryDate Expiry date of the Retention set (UTC) (format example: 2020-08-13T10:43:36.712Z)
Action Type ActionByScheduler/ActionbyUser
StatusType

Full: the Retention process finished successfully.

Partial: The Retention process succeeded for part of the volumes.

IsAppAware (Boolean: true/false) Whether or not this VM in this Retention Set is application aware.
SizeInKB Size of the Retention set, in kb
AggregatedSizeInKB

Size of the Retention set including the Retention chain, in kb.

0 for Incremental sets.

NumberOfIncrementals Number of Incremental Retention sets in the chain

Get Incremental Retention Sets

v1/ltr/catalog/fullretentionSets/incrementals returns a list of incremental Retention sets.

Method URL
GET

https://zvm_ip:port/v1/ltr/catalog/fullretentionSets/incrementals?repositoryIdentifier={{repositoryIdentifier}}&vpgIdentifier={{vpgIdentifier}}&zorgIdentifier={{zorgIdentifier}}

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
repositoryIdentifier The unique identifier of the repository where the Retention Set is stored.
vpgIdentifier The unique identifier of the VPG.
ZorgIdentifier The Zerto organization for which the retention set was created, for ZCM sites.
Request Body Using JSON Format

The request body is empty.

HTTP Response in JSON Format

The following is an example response JSON body for https://zvm_ip:port/v1/ltr/catalog/fullretentionSets/incrementals?repositoryIdentifier={{repositoryIdentifier}}&vpgIdentifier={{vpgIdentifier}}&zorgIdentifier={{zorgIdentifier}}:

{

     "RetentionSets": [

          {

           "RetentionSetIdentifier": "String content",

                "BackupMethod": "Incremental",

             "Vpg": {

                        "Name": "String content",

                  "Identifier": "VM1"

              },

              "Repository": {

                 "Name": "String content",

                 "Identifier": "String content"

         },

              "Zorg": {

          "Name": String content,

             "Identifier": "String content"

         },

             "PointInTime": "String content",

              "ExpiryDate": "String content",

            "ActionType": "ActionByUser",

           "StatusType": "Full",

           "IsAppAware": Boolean,

             "SizeInKB": Value,

         "AggregatedSizeInKB": Value,

         "NumberOfIncrementals": 0

         }

     ]

 }

Where:

RetentionSetIdentifier The unique identifier of the Retention set.
BackupMethod The intended Retention method (full, incremental, partial)
Vpg  
Name The name of the VPG.
Identifier The LTR identifier of the VPG.
Zorg  
Name The name of the ZORG (Zerto organization for which the retention set was created, for ZCM sites).
ZorgIdentifier The identifier of the ZORG (Zerto organization for which the retention set was created, for ZCM sites).
PointInTime The Retention process start time (UTC)(format example: 2020-08-06T10:43:36.837Z)
ExpiryDate Expiry date of the Retention set (UTC) (format example: 2020-08-13T10:43:36.712Z)
Action Type ActionByScheduler/ActionbyUser
StatusType

Full: the Retention process finished successfully.

Partial: The Retention process succeeded for part of the volumes.

IsAppAware (Boolean: true/false) Whether or not this VM in this Retention Set is application aware.
SizeInKB Size of the Retention set, in kb
AggregatedSizeInKB

Size of the Retention set including the Retention chain, in kb

0 for Incremental sets.
NumberOfIncrementals Number of Incremental Retention sets in the chain

Delete Retention Sets

v1/ltr/catalog/deleteretentionsets deletes Retention sets.

Method URL
POST

https://zvm_ip:port/v1/ltr/catalog/deleteretentionsets

The following is an example of a request body for v1/ltr/catalog/deleteretentionsets:

{ "RetentionSetsToDelete":[ {"FullRetentionSetIdentifier":"String content", "IncrementalRetentionSetsIdentifiers": ["String content", "String content"]} ]}

Where:

FullRetentionSetIdentifier The unique identifier of the Full Retention set.
IncrementalRetentionSetsIdendifiers The unique identifier of the Incremental Retention set.
HTTP Response in JSON Format

The following is an example response JSON body for https://zvm_ip:port/v1/ltr/catalog/deleteretentionsets:

200 OK