Description
You can call this operation to parse the backup information of a tenant.
Call description
Prerequisites
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
GET /api/v2/ob/clusters/{id}/tenants/{tenantId}/backup/info
Request parameters
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1002 | The ID of the cluster. |
| tenantId | Integer | Yes | 108 | The ID of the tenant. |
Query parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| startTime | String | No | 2024-08-06T00:00:00Z | The start time. The value must be UTC time in the YYYY-MM-DDThh:mm:ssZ format. |
| endTime | String | No | 2024-08-07T00:00:00Z | The end time. The value must be UTC time in the YYYY-MM-DDThh:mm:ssZ format. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see Data structure of ObTenantBackupInfo. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The 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 ObTenantBackupInfo
| Parameter | Type | Description |
|---|---|---|
| clusterName | String | The name of the cluster. |
| obClusterId | Integer | The ID of the OceanBase cluster. |
| clusterId | Integer | The ID of the cluster. |
| obTenantId | Integer | The ID of the OceanBase Database tenant. |
| tenantId | Integer | The ID of the tenant. |
| tenantName | String | The name of the tenant. |
| online | Boolean | Indicates whether the tenant is online. |
| obRecoverableInfoAggregation | ObRecoverableInfoAggregation | The restorable period. For more information, see Data structure of ObRecoverableInfoAggregation. |
Data structure of ObRecoverableInfoAggregation
| Parameter | Type | Description |
|---|---|---|
| obQueryTimeScopeType | String | The type of the query period. At present, this parameter is used when you specify the restorable period or storage trend. |
| latestSevenDaysAggregation | LatestSevenDaysAggregation | An aggregate set of periods during which data can be restored. 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 restored. |
| |----obRecoverableSectionItemType | String | The type of the restorable backup node. Valid values: FULL_DATA_BACKUP: indicates full data backup.INCREMENTAL_DATA_BACKUP: indicates incremental data backup.LOG_BACKUP: indicates log backup.RECOVERABLE: indicates a restorable point in time. |
| |--backupDimension | String | The backup dimension. For example, CLUSTER indicates cluster backup and TENANT indicates tenant backup. |
| |----backupMode | String | The backup mode. Valid values: LOGICAL_BACKUP: indicates logical backup.PHYSICAL_BACKUP: indicates physical backup. |
| |----dataBackupRecoverableInfo | Object | The restorable data of the backup. This parameter is valid only when the type of the restorable backup node is FULL_DATA_BACKUP or INCREMENTAL_DATA_BACKUP. |
| |----freezeTime | OffsetDateTime | The freeze time of the data backup. |
| |----recoverableTime | OffsetDateTime | The point in time at which the data backup can be restored. |
| |----dataVersion | Long | The data version. |
| |----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 with the same full backup set ID. |
| |----logRecoverableTimeInterval | Object | The period during which the log backup can be restored. This parameter is valid only when the type of the restorable backup node is LOG_BACKUP. |
| |----startTime | OffsetDateTime | The start time. |
| |----endTime | OffsetDateTime | The end time. |
| |----realRecoverableTimeInterval | Object | The actual restorable period. This parameter is valid only when the type of the restorable backup node is RECOVERABLE. |
| |----startTime | OffsetDateTime | The start time. |
| |----endTime | OffsetDateTime | The end time. |
Examples
Sample request
GET /api/v2/ob/clusters/1000005/tenants/1000012/backup/info
Sample response
{
"data": {
"clusterId": 1000005,
"clusterName": "ob4210",
"obClusterId": 1658110539,
"obRecoverableInfoAggregation": {
"latestSevenDaysAggregation": {
"obRecoverableSectionItems": [
{
"backupDimension": "CLUSTER",
"backupMode": "PHYSICAL_BACKUP",
"dataBackupRecoverableInfo": {
"dataVersion": -1,
"freezeTime": "1970-01-01T08:00:00+08:00",
"fullBackupSetId": 1,
"recoverableTime": "2024-08-02T16:01:41.862678516+08:00"
},
"obRecoverableSectionItemType": "FULL_DATA_BACKUP"
},
{
"backupDimension": "CLUSTER",
"backupMode": "PHYSICAL_BACKUP",
"dataBackupRecoverableInfo": {
"dataVersion": -1,
"freezeTime": "1970-01-01T08:00:00+08:00",
"fullBackupSetId": 2,
"recoverableTime": "2024-08-03T04:02:20.132919855+08:00"
},
"obRecoverableSectionItemType": "FULL_DATA_BACKUP"
},
{
"backupDimension": "CLUSTER",
"backupMode": "PHYSICAL_BACKUP",
"dataBackupRecoverableInfo": {
"dataVersion": -1,
"freezeTime": "1970-01-01T08:00:00+08:00",
"fullBackupSetId": 3,
"recoverableTime": "2024-08-06T04:02:41.523113062+08:00"
},
"obRecoverableSectionItemType": "FULL_DATA_BACKUP"
},
{
"backupMode": "PHYSICAL_BACKUP",
"logRecoverableTimeInterval": {
"endTime": "2024-08-07T10:29:03.21621827+08:00",
"startTime": "2024-08-02T15:58:40.936369856+08:00"
},
"obRecoverableSectionItemType": "LOG_BACKUP"
},
{
"backupMode": "PHYSICAL_BACKUP",
"obRecoverableSectionItemType": "RECOVERABLE",
"realRecoverableTimeInterval": {
"endTime": "2024-08-07T10:29:03.21621827+08:00",
"startTime": "2024-08-02T16:01:41.862678516+08:00"
}
}
]
},
"obQueryTimeScopeType": "LATEST_SEVEN_DAYS"
},
"obTenantId": 1004,
"online": true,
"tenantId": 1000012,
"tenantName": "tenantA"
},
"duration": 1332,
"server": "74f95ea2f4",
"status": 200,
"successful": true,
"timestamp": "2024-08-07T11:29:56.261+08:00",
"traceId": "c7c25af8e9689c09"
}