Description
You can call this operation to view the log 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/logBackupTasks
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 | STARTING | The task status. Valid values: STARTING: The task is being started.INPROGRESS: The task is in progress.STOPPING: The task is being stopped.STOPPED: The task has been stopped.FAILED: The task failed.INTERRUPTED: The task is interrupted.UNKNOWN: The task status is unknown. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see Data structure of LogBackupWrapperTask. |
| 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 LogBackupWrapperTask
| Parameter | Type | Description |
|---|---|---|
| backupDimension | String | The backup dimension. For example, CLUSTER indicates cluster backup and TENANT indicates tenant backup. |
| createTime | Timestamp | The time when the task was created. |
| modifyTime | Timestamp | The time when the task was modified. |
| 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. |
| status | String | The status. |
| errorMsg | String | The error message. |
| backupUri | String | The backup path. |
| checkpoint | Timestamp | The latest checkpoint. |
| backupMode | String | The backup mode. |
| delay | Long | The log delay, in seconds. |
Examples
Sample request
GET /api/v2/ob/clusters/1000005/tenants/1000012/backup/task/logBackupTasks?page=1&size=10
Sample response
{
"data": {
"contents": [
{
"agentServerIp": "xxx.xxx.xxx.xxx",
"backupDimension": "TENANT",
"backupMode": "PHYSICAL_BACKUP",
"backupUri": "file:///obbackup",
"checkpoint": "2024-08-09T16:04:21.810084+08:00",
"clusterId": 1000005,
"clusterName": "ob_431",
"clusterType": "PRIMARY",
"createTime": "2024-08-09T15:58:21.716899+08:00",
"delay": 100.1899,
"obClusterId": 199,
"obTenantId": 1050,
"status": "RUNNING",
"tenantId": 1000012,
"tenantName": "ww1144"
}
],
"page": {
"number": 1,
"size": 10,
"totalElements": 1,
"totalPages": 1
}
},
"duration": 79,
"server": "a24d13ce67",
"status": 200,
"successful": true,
"timestamp": "2024-08-09T16:06:02.743+08:00",
"traceId": "8e1e79e260d12bba"
}