Recovery points

Get the number of restore points that are available (a recovery point) for each protected virtual machine with its primary key (pk).

Tip

To get the primary key (pk) as well as other detailed information about each protected virtual machine, follow the instructions in Protected virtual machines.

_images/reference_report10001_04.png

Figure 79 An example report of VM Backup Utilization. Each virtual machine has its restore points which is the number of backup snapshots you can restore.

Method and URI

To get a recovery point for each protected virtual machine, use a POST method and a URI:

POST    https://{hostname|IPv4}/api/endeavour/catalog/recovery/hypervisorvm

Parameters

Parameter 1: action

Invoke aggregate functions. For more information about aggregate functions, see Aggregate functions.

  • Value: aggregate

  • Type: Array. Required. Available in the web user interface.

Parameter 2: filter

  • Value:

[
    {
        "property": "sessionId",
        "op":       ">",
        "value":    "0"
    }
]
  • Type: Array. Required. Available in the web user interface.

Data

Data 1: op

Use the COUNT() function for the pk values. For more information about the COUNT() function, see COUNT().

  • Value:

[
    {
       "operation":  "count",
       "fieldname":  "pk",
       "outputname": "count"
    }
]
  • Type: Array. Required. Available in the web user interface.

Data 2: group

Use the GROUP clause with the primary key values. For more information about the GROUP clause, see GROUP clause.

  • Value: ["pk"]

  • Type: Array. Required. Available in the web user interface.

Data 3: copytype

  • Value: versiononly

  • Type: System string. Required.

Example: Get information about recovery points

Assume that you have two protected virtual machines:

  • sales-americas:

    • Primary key: 92647504afd9005226aef77bc0b98abb

    • Base backup size: 100 GB (107,374,182,400 bytes)

    • Incremental backup snapshot sizes: 10 GB (10,737,418,240 bytes, 1 GB x 10 backup snapshots)

    • Total backup size: 110 GB

  • sales-sql:

    • Primary key: 8989CFF1-6F16-4E2B-9FCC-9F8C8CD719C9

    • Base backup size: 1 TB (1,073,741,824,000 bytes)

    • The sum of all incremental backup snapshots: 1 TB x 1 backup snapshot

    • Total backup size: 2 TB

A Python snippet that is similar to the following example can be used to get a list of protected virtual machines and their primary key and a recovery point. In this example, the value will be shown with the key name count.

_params = {
    "action": "aggregate",
    "filter": str([
        {
            "property": "sessionId",
            "op":       ">",
            "value":    "0"
        }
    ])
}

data = f'''{{
    "op":       [
                    {{
                        "operation":  "count",
                        "fieldname":  "pk",
                        "outputname": "count"
                    }}
                ],
    "group":    [
                    "pk"
                ],
    "copytype": "versiononly"
}}'''

requests.post('https://' + spp_ipv4
    + '/api/endeavour/catalog/recovery/hypervisorvm',
    headers={...}, params=_params, data=_data, verify=...)

The request prompts a response that is structured as shown, with the HTTP status of 200 (OK). As you can see, the protected virtual machine sales-americas has ten backup snapshots (recovery points) and sales-sql has one snapshot.

{
    "links": {...},
    "results": [
        {
            "_id": {
                "pk": "8989CFF1-6F16-4E2B-9FCC-9F8C8CD719C9"
            },
            "count": 1
        },
        {
            "_id": {
                "pk": "92647504afd9005226aef77bc0b98abb"
            },
            "count": 10
        },
        {...}, ..., {...}
    ]
}