Query log backup tasks of a cluster

2023-08-22 02:46:05  Updated

Description

You can call this operation to query the log backup tasks of an OceanBase 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/logBackupTasks

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.
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 LogBackupWrapperTask array. For more information about the data structure, see Data structure of LogBackupWrapperTask .
├─ 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 LogBackupWrapperTask

Parameter Type Description
createTime Timestamp The creation time.
modifyTime Timestamp The modification time.
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.
status String The status of the task.
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/backup/task/logBackupTasks?page=1&size=10

Sample response

{
    "data": {
        "contents": [
            {
                "agentServerIp": "xxx.xxx.xxx.1",
                "backupMode": "PHYSICAL_BACKUP",
                "backupUri": "file:///obbackup/",
                "checkpoint": "2021-09-23T14:33:17.357+0800",
                "clusterId": 1000005,
                "clusterName": "yc0820_17",
                "clusterType": "PRIMARY",
                "createTime": "2021-09-09T16:19:47.405+0800",
                "delay": 77.6421,
                "obClusterId": 5,
                "status": "RUNNING"
            }
        ],
        "page": {
            "number": 1,
            "size": 1,
            "totalElements": 1,
            "totalPages": 1
        }
    },
    "duration": 112,
    "server": "xxx.xxx.xxx.2",
    "status": 200,
    "successful": true,
    "timestamp": "2021-09-23T14:34:35.149+08:00",
    "traceId": "0e74add7846c479c"
}

Contact Us