Parse cluster backup data

2023-08-22 02:46:05  Updated

Description

You can call this operation to parse the backup data of a specified cluster.

Call description

Prerequisites

  • You have the Read-only permission on cluster backup and recovery.

  • You have passed the authentication for the OCP application service.

Request path

GET /api/v2/ob/clusters/{id}/backup/info

Request parameters

Parameter Type Required Example value Description
id Integer Yes 1001 The ID of the cluster for which you want to parse the backup data.
startTime OffsetDateTime No 2021-09-16T15:14:51.397+08:00 The time when data parsing starts.
endTime OffsetDateTime No 2021-09-16T15:20:51.397+08:00 The time when data parsing ends.

Response parameters

Parameter Type Description
data Object ObClusterBackupInfo. For more information, see Data structure of ObClusterBackupInfo .
successful Boolean Indicates whether the request was successful.
timestamp Datetime The timestamp when the server completed the request.
duration Integer The time taken by the server to process the request, in milliseconds.
status Integer An HTTP status code.
traceId String The trace ID of the request. This trace ID is used for troubleshooting.
server String The address of the application server that responded to the request.

Data structure of ObClusterBackupInfo

Parameter Type Description
clusterName String The name of the cluster.
obClusterId Long The ID of the OceanBase cluster.
clusterId Long The ID of the cluster.
online Boolean Indicates whether the cluster was online.
tenantBackupInfos Array The tenant backup data. For more information about the elements, see Data structure of ObTenantBackupInfo .
obRecoverableInfoAggregation Object The period during which data can be recovered. It is the aggregation of the periods for all tenants. This parameter is the same as obRecoverableInfoAggregation in tenantBackupInfos.

Data structure of ObTenantBackupInfo

Parameter Type Description
clusterName String The name of the cluster.
obClusterId Long The ID of the OceanBase cluster.
clusterId Long The ID of the cluster.
obTenantId Long The ID of the OceanBase Database tenant.
tenantId Long The ID of the tenant.
tenantName String The name of the tenant.
online Boolean Indicates whether the tenant was online.
obRecoverableInfoAggregation Object The period during which data can be recovered.
|----latestSevenDaysAggregation Object An aggregate set of the number of days during which data can be recovered. For more information, see Data structure of LatestSevenDaysAggregation .

Data structure of LatestSevenDaysAggregation

Parameter Type Description
obRecoverableSectionItems Array The list of periods during which data can be recovered.
|----obRecoverableSectionItemType String The type of the recoverable backup node. Valid values: FULL_DATA_BACKUP INCREMENTAL_DATA_BACKUP LOG_BACKUP RECOVERABLE
|----backupMode String The backup mode, which can be logical backup or physical backup.
|----dataBackupRecoverableInfo Object The recoverable data of the backup. This parameter is valid only when the type of the recoverable backup node is FULL_DATA_BACKUP or INCREMENTAL_DATA_BACKUP.
|----freezeTime OffsetDateTime The freeze time of the data backup.
|----recoverableTime OffsetDateTime The time at which a data backup can be recovered.
|----dataVersion Long The version of the data.
|----fullBackupSetId Long The ID of the full backup set. The ID is used to identify the relationship between full data backups and incremental data backups in physical backup mode. A full backup matches an incremental backup of the same full backup set ID.
|----logRecoverableTimeInterval Object The period during which the log backup can be recovered. This parameter is valid only when the type of the recoverable backup node is LOG_BACKUP.
|----startTime OffsetDateTime The start time.
|----endTime OffsetDateTime The end time.
|----logRecoverableTimeInterval Object The true recoverable period, which is valid only when the type of the recoverable backup node is RECOVERABLE.
|----startTime OffsetDateTime The start time.
|----endTime OffsetDateTime The end time.

Examples

Sample request

Parse the backup data of the cluster with an ID of 1.

GET /api/v2/ob/clusters/1/backup/info

Sample response

{
    "data": {
        "clusterId": 1000005,
        "clusterName": "yc0820_17",
        "obClusterId": 5,
        "obRecoverableInfoAggregation": {
            "latestSevenDaysAggregation": {
                "obRecoverableSectionItems": [
                    {
                        "backupMode": "PHYSICAL_BACKUP",
                        "dataBackupRecoverableInfo": {
                            "dataVersion": 32,
                            "freezeTime": "2021-09-16T02:00:10.986847+08:00",
                            "fullBackupSetId": 23,
                            "recoverableTime": "2021-09-16T17:25:02.993613+08:00"
                        },
                        "obRecoverableSectionItemType": "FULL_DATA_BACKUP"
                    },
                    {
                        "backupMode": "PHYSICAL_BACKUP",
                        "logRecoverableTimeInterval": {
                            "endTime": "2021-09-23T15:13:20.657125+08:00",
                            "startTime": "2021-09-16T15:14:51.397+08:00"
                        },
                        "obRecoverableSectionItemType": "LOG_BACKUP"
                    },
                    {
                        "backupMode": "PHYSICAL_BACKUP",
                        "obRecoverableSectionItemType": "RECOVERABLE",
                        "realRecoverableTimeInterval": {
                            "endTime": "2021-09-23T15:13:20.657125+08:00",
                            "startTime": "2021-09-16T15:14:51.397+08:00"
                        }
                    }
                ]
            },
            "obQueryTimeScopeType": "LATEST_SEVEN_DAYS"
        },
        "online": true,
        "tenantBackupInfos": [
            {
                "clusterId": 1000005,
                "clusterName": "yc0820_17",
                "obClusterId": 5,
                "obRecoverableInfoAggregation": {
                    "latestSevenDaysAggregation": {
                        "obRecoverableSectionItems": [
                            {
                                "backupMode": "PHYSICAL_BACKUP",
                                "dataBackupRecoverableInfo": {
                                    "dataVersion": 32,
                                    "freezeTime": "2021-09-16T02:00:10.986847+08:00",
                                    "fullBackupSetId": 23,
                                    "recoverableTime": "2021-09-16T17:25:02.993613+08:00"
                                },
                                "obRecoverableSectionItemType": "FULL_DATA_BACKUP"
                            },
                            {
                                "backupMode": "PHYSICAL_BACKUP",
                                "logRecoverableTimeInterval": {
                                    "endTime": "2021-09-23T15:13:17.654205+08:00",
                                    "startTime": "2021-09-16T15:14:51.397+08:00"
                                },
                                "obRecoverableSectionItemType": "LOG_BACKUP"
                            },
                            {
                                "backupMode": "PHYSICAL_BACKUP",
                                "obRecoverableSectionItemType": "RECOVERABLE",
                                "realRecoverableTimeInterval": {
                                    "endTime": "2021-09-23T15:13:17.654205+08:00",
                                    "startTime": "2021-09-16T15:14:51.397+08:00"
                                }
                            }
                        ]
                    },
                    "obQueryTimeScopeType": "LATEST_SEVEN_DAYS"
                },
                "obTenantId": 1002,
                "online": true,
                "tenantId": 2000004,
                "tenantName": "ycrestore"
            },
            {
                "clusterId": 1000005,
                "clusterName": "yc0820_17",
                "obClusterId": 5,
                "obRecoverableInfoAggregation": {
                    "latestSevenDaysAggregation": {
                        "obRecoverableSectionItems": [
                            {
                                "backupMode": "PHYSICAL_BACKUP",
                                "dataBackupRecoverableInfo": {
                                    "dataVersion": 32,
                                    "freezeTime": "2021-09-16T02:00:10.986847+08:00",
                                    "fullBackupSetId": 23,
                                    "recoverableTime": "2021-09-16T17:25:02.993613+08:00"
                                },
                                "obRecoverableSectionItemType": "FULL_DATA_BACKUP"
                            },
                            {
                                "backupMode": "PHYSICAL_BACKUP",
                                "logRecoverableTimeInterval": {
                                    "endTime": "2021-09-23T15:13:20.657125+08:00",
                                    "startTime": "2021-09-16T15:14:51.397+08:00"
                                },
                                "obRecoverableSectionItemType": "LOG_BACKUP"
                            },
                            {
                                "backupMode": "PHYSICAL_BACKUP",
                                "obRecoverableSectionItemType": "RECOVERABLE",
                                "realRecoverableTimeInterval": {
                                    "endTime": "2021-09-23T15:13:20.657125+08:00",
                                    "startTime": "2021-09-16T15:14:51.397+08:00"
                                }
                            }
                        ]
                    },
                    "obQueryTimeScopeType": "LATEST_SEVEN_DAYS"
                },
                "obTenantId": 1001,
                "online": true,
                "tenantId": 1000012,
                "tenantName": "yctest"
            }
        ]
    },
    "duration": 1085,
    "server": "xxx.xxx.xxx.xxx",
    "status": 200,
    "successful": true,
    "timestamp": "2021-09-23T15:14:52.48+08:00",
    "traceId": "3c0d0f99f6d649ce"
}

Contact Us