Description
You can call this operation to query data backup tasks of a 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/task/dataBackupTasks
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the cluster. |
| startTime | OffsetDateTime | No | 2021-09-16T15:14:51.397+08:00 | The start time of the period. |
| endTime | OffsetDateTime | No | 2021-09-16T15:20:51.397+08:00 | The end time of the period. |
| backupSetId | Long | No | 23 | The ID of the data backup set. |
| page | Long | Yes | 1 | The page number of the content to be queried. |
| size | Long | Yes | 10 | The number of records on each page. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object | The requested data. |
| ├─ contents | Array | The DataBackupHistoryWrapperTask array. For more information about the data structure, see Data structure of DataBackupHistoryWrapperTask . |
| ├─ page | Object | The page information. |
| ├─ totalElements | Integer | The total number of records. |
| ├─ totalPage | Integer | The total number of pages. |
| ├─ number | Integer | The number of the current page. |
| ├─ size | Integer | The size of the current page. |
| 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 DataBackupHistoryWrapperTask
| Parameter | Type | Description |
|---|---|---|
| taskId | Long | The ID of the task. |
| backupType | String | The type of the backup. |
| taskType | String | The type of the task. |
| clusterName | String | The name of the cluster. |
| clusterId | Long | The ID of the cluster. |
| obClusterId | Long | The ID of the OceanBase cluster. |
| obTenantId | Long | The ID of the OceanBase Database tenant. |
| clusterType | String | The type of the cluster. Valid values: PRIMARY and STANDBY. |
| tenantId | Long | The ID of the tenant. |
| tenantName | String | The name of the tenant. |
| startTime | Timestamp | The start time. |
| finishTime | Timestamp | The end time. |
| status | String | The status of the task. |
| errorMsg | String | The error message. |
| dataVersion | Long | The data version. |
| backupUri | String | The backup path. |
| dataType | String | The data type. |
| schemaVersion | Long | The version of the schema. |
| backupSetId | Long | The ID of the data backup set. |
| backupMode | String | The backup mode. |
| dataBackupTaskType | String | The type of the backup task. |
| dataSecondaryBackupTaskIds | Arrays | The list of secondary backup tasks performed upon the backup set ID. This parameter is valid only for physical backup. |
Examples
Sample request
GET api/v2/ob/clusters/1000005/backup/task/dataBackupTasks?page=1&size=10
Sample response
{
"data": {
"contents": [
{
"backupMode": "PHYSICAL_BACKUP",
"backupSetId": 23,
"backupUri": "file:///obbackup/",
"clusterId": 1000005,
"clusterName": "yc0820_17",
"clusterType": "PRIMARY",
"dataBackupTaskType": "FULL_BACKUP",
"dataSecondaryBackupTaskIds": [
14
],
"dataVersion": 32,
"finishTime": "2021-09-16T17:25:05.943+0800",
"obClusterId": 5,
"startTime": "2021-09-16T17:25:02.993+0800",
"status": "DONE",
"taskId": 23,
"tenantId": 0
},
{
"backupMode": "PHYSICAL_BACKUP",
"backupSetId": 22,
"backupUri": "file:///obbackup/",
"clusterId": 1000005,
"clusterName": "yc0820_17",
"clusterType": "PRIMARY",
"dataBackupTaskType": "FULL_BACKUP",
"dataSecondaryBackupTaskIds": [
12
],
"dataVersion": 31,
"finishTime": "2021-09-15T17:25:06.269+0800",
"obClusterId": 5,
"startTime": "2021-09-15T17:25:03.498+0800",
"status": "DONE",
"taskId": 22,
"tenantId": 0
},
{
"backupMode": "PHYSICAL_BACKUP",
"backupSetId": 21,
"backupUri": "file:///obbackup/",
"clusterId": 1000005,
"clusterName": "yc0820_17",
"clusterType": "PRIMARY",
"dataBackupTaskType": "FULL_BACKUP",
"dataSecondaryBackupTaskIds": [
10
],
"dataVersion": 29,
"finishTime": "2021-09-13T17:25:08.473+0800",
"obClusterId": 5,
"startTime": "2021-09-13T17:25:05.687+0800",
"status": "DONE",
"taskId": 21,
"tenantId": 0
}
],
"page": {
"number": 1,
"size": 2000,
"totalElements": 3,
"totalPages": 1
}
},
"duration": 84,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-23T11:03:24.945+08:00",
"traceId": "975e0a8a452e4ab7"
}