Base backup sizes

You can get a base backup size in bytes for each protected virtual machine by using the 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 this section. To get the sum of data sizes of all backup snapshots for each protected virtual machine, follow the instructions in Incremental backup sizes.

Method and URI

To get a base 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, see Aggregate functions.

  • Value: aggregate

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

Parameter 2: filter

  • Value:

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

Data

Data 1: op

Use the MAX() function for the protectionInfo.transferSize values. For more information about the MAX() function, see MAX().

  • Value:

[
    {
       "operation":  "max",
       "fieldname":  "protectionInfo.transferSize",
       "outputname": "baseBackupSize"
    }
]
  • 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 the base backup size for virtualized system protection

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 a base backup size for each. In this example, the value will be shown with the output key name baseBackupSize.

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

_data = f'''{{
    "op":    [
        {{
            "operation":  "max",
            "fieldname":  "protectionInfo.transferSize",
            "outputname": "baseBackupSize"
        }}
    ],
    "group": [
        "pk"
    ],
    "copytype": "versiononly"
}}'''


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

Figure 78 In this report, the backup size for each virtual machine is a sum of the base backup size and the incremental backup sizes.

The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).

{
    "links": {...},
    "results": [
        {
            "_id": {
                "pk": "2cc67ed7057bf949ce068f477a1ee6f5"
            },
            "baseBackupSize": 107374182400
        },
        {
            "_id": {
                "pk": "8989CFF1-6F16-4E2B-9FCC-9F8C8CD719C9"
            },
            "baseBackupSize": 1073741824000
        },
        {...}, ..., {...}
    ]
}