Incremental backup sizes

You can get an incremental backup size for each protected virtual machine by using 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. To get the data size of the base backup for each protected virtual machine, follow the instructions in Base backup sizes.

Method and URI

To get an incremental backup size 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, follow the instructions in Aggregate functions.

  • Value: aggregate

  • Type: System string. Required. Available in the web user interface.

Parameter 2: filter

Optionally, you may use a filter to specify the type of virtualized systems. If this parameter is not used, the request counts all protected virtual machines regardless of the type of virtualized systems. You can use the filter operation parameters that are described in Filter.

  • Value:

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

Data

Data 1: op

Use the SUM() function for the protectionInfo.transferSize values. For more information about the SUM() function, follow the instructions in SUM().

  • Value:

[
    {
       "operation":  "sum",
       "fieldname":  "protectionInfo.transferSize",
       "outputname": "incrBackupSize"
    }
]
  • 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, follow the instructions in 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 incremental backup sizes

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 (115,343,360 bytes)

  • 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

The Python code snippet below will return a list of protected virtual machines and their primary key and incremental backup size. In this example, the value will be shown with the key name baseBackupSize.

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

_data = f'''{{
    "op":    [
        {{
            "operation":  "sum",
            "fieldname":  "protectionInfo.transferSize",
            "outputname": "incrBackupSize"
        }}
    ],
    "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).

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