Description
You can call this operation to view the data backup tasks 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/task/dataBackupTasks
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. |
| status | Array | No | DONE | The task status. Valid values: BEGINNING: The task is being started.INITIALIZING: The task is being initialized.DOING: The task is in progress.DONE: The task has been completed.FAILED: The task failed.CANCELING: The task is being canceled.CANCELED: The task has been canceled.OVERDUE: The task has expired.UNKNOWN: The task status is unknown. |
| backupSetId | Integer | No | 1 | The ID of the data backup set. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see Data structure of DataBackupHistoryWrapperTask. |
| 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 DataBackupHistoryWrapperTask
| Parameter | Type | Description |
|---|---|---|
| backupDimension | String | The backup dimension. For example, CLUSTER indicates cluster backup and TENANT indicates tenant backup. |
| taskId | Long | The ID of the task. |
| backupType | String | The backup type. |
| 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: indicates a primary cluster.STANDBY: indicates a standby cluster. |
| 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. |
| errorMsg | String | The error message. |
| dataVersion | Long | The data version. |
| backupUri | String | The backup path. |
| dataType | String | The data type. |
| schemaVersion | Long | The schema version. |
| backupSetId | Long | The ID of the data backup set. |
| backupMode | String | The backup mode. |
| dataBackupTaskType | String | The type of the data backup task. |
| dataSecondaryBackupTaskIds | Arrays | The list of second backup tasks performed based on the backup set ID. This parameter is valid only for physical backup. |
Examples
Sample request
GET /api/v2/ob/clusters/1000005/tenants/1000012/backup/task/dataBackupTasks?page=1&size=10
Sample response
{
"data": {
"contents": [
{
"backupDimension": "TENANT",
"backupMode": "PHYSICAL_BACKUP",
"backupSetId": 1,
"backupUri": "file:///obbackup/ob_431/199/tenant_incarnation_1/1050/data",
"clusterId": 1000005,
"clusterName": "ob_431",
"clusterType": "PRIMARY",
"dataBackupTaskType": "FULL_BACKUP",
"duration": 125,
"errorMsg": "",
"finishTime": "2024-08-09T08:02:57.715753Z",
"obClusterId": 199,
"obTenantId": 1050,
"snapshotVersionTime": "2024-08-09T08:02:57.647741Z",
"startTime": "2024-08-09T08:00:52.151857Z",
"status": "DONE",
"taskId": 1,
"tenantId": 1000012,
"tenantName": "ww1144"
}
],
"page": {
"number": 1,
"size": 5000,
"totalElements": 1,
"totalPages": 1
}
},
"duration": 122,
"server": "a24d13ce67",
"status": 200,
"successful": true,
"timestamp": "2024-08-09T16:13:34.483+08:00",
"traceId": "5cf1b02e0f6f76b3"
}