This topic describes how to view cluster-level backup tasks by using the API.
Request parameters
Request constraints
If a password is set, authentication is required. For more information, see API hybrid encryption.
Request path
GET /api/v1/obcluster/backup/overview
Return result
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request is successful. |
| timestamp | time.Time | The timestamp when the request is completed on the server. |
| duration | int | The time required for the server to process the request (in milliseconds). |
| status | int | The HTTP status code. |
| traceId | string | The Trace ID of the request. |
| data | []CdbObBackupTask | The backup task list. For more information about the CdbObBackupTask data structure, see Data structure of CdbObBackupTask. |
| error | ApiError | The error generated during the request, which contains the following information:
|
The data structure of CdbObBackupTask is as follows:
| Parameter | Type | Description |
|---|---|---|
| tenant_id | int | The tenant ID. |
| task_id | int | The ID of the task-level backup task, which corresponds to one backup set. |
| job_id | int | The JOB_ID of the task. |
| incarnation | int | The number of times the Flashback Database has been performed. |
| backup_set_id | int | The ID of the backup set corresponding to the task. |
| start_timestamp | time.Time | The start time of the task. |
| end_timestamp | time.Time | The end time of the task. |
| status | string | The status of the backup. |
| start_scn | int | The SCN at which the backup starts. |
| end_scn | int | The SCN at which the backup ends. |
| user_ls_start_scn | int | The SCN of the META of the log stream. |
| encryption_mode | string | The encryption mode, which can take the following values:
None and Password are supported. |
| input_bytes | int | The number of input bytes. |
| output_bytes | int | The number of output bytes. |
| output_rate_bytes | int | The number of output bytes per second. |
| extra_meta_bytes | int | The number of extra bytes. |
| tablet_count | int | The total number of TABLETs. |
| finish_tablet_count | int | The total number of completed TABLETs. |
| macro_block_count | int | The total number of macro blocks. |
| finish_macro_block_count | int | The total number of completed macro blocks. |
| file_count | int | The total number of backup files. |
| meta_turn_id | int | The number of rounds of backup META. |
| data_turn_id | int | The number of rounds of backup DATA. |
| result | int | The backup error code result. |
| comment | string | The description of the error code. |
| path | string | The backup path. |
Examples
Example request
GET 10.10.10.1:2886/api/v1/obcluster/overview
Example response
{
"successful": true,
"timestamp": "2024-10-12T18:12:51.179120149+08:00",
"duration": 52,
"status": 200,
"traceId": "1868835c2071a85a",
"data": {
"statuses": [
{
"tenant_id": 1002,
"task_id": 1,
"job_id": 1,
"incarnation": 1,
"backup_set_id": 1,
"start_timestamp": "2024-10-12T18:08:08.723714+08:00",
"end_timestamp": "2024-10-12T18:10:43.487426+08:00",
"status": "COMPLETED",
"start_scn": 1728727696264250400,
"end_scn": 1728727843446713000,
"user_ls_start_scn": 1728727710694531300,
"encryption_mode": "NONE",
"input_bytes": 128825794,
"output_bytes": 22320897,
"output_rate_bytes": 144225.6503,
"extra_meta_bytes": 0,
"tablet_count": 596,
"finish_tablet_count": 596,
"macro_block_count": 61,
"finish_macro_block_count": 61,
"file_count": 0,
"meta_turn_id": 1,
"data_turn_id": 0,
"result": 0,
"comment": "",
"path": "oss://oss-328067-1012-obshell/backup/archive/test/1/1002/data?host=oss-cn-hangzhou.aliyuncs.com"
},
{
"tenant_id": 1004,
"task_id": 1,
"job_id": 1,
"incarnation": 1,
"backup_set_id": 1,
"start_timestamp": "2024-10-12T18:08:08.760053+08:00",
"end_timestamp": "2024-10-12T18:10:46.209384+08:00",
"status": "COMPLETED",
"start_scn": 1728727701874235100,
"end_scn": 1728727846169762600,
"user_ls_start_scn": 1728727714351766000,
"encryption_mode": "NONE",
"input_bytes": 101560294,
"output_bytes": 23082192,
"output_rate_bytes": 146600.7626,
"extra_meta_bytes": 0,
"tablet_count": 596,
"finish_tablet_count": 596,
"macro_block_count": 48,
"finish_macro_block_count": 48,
"file_count": 0,
"meta_turn_id": 1,
"data_turn_id": 0,
"result": 0,
"comment": "",
"path": "oss://oss-328067-1012-obshell/backup/archive/test/1/1004/data?host=oss-cn-hangzhou.aliyuncs.com"
}
]
}
}
References
You can also call API methods by using SDKs.
For more information about how to call API methods by using obshell-sdk-python, see View cluster-level backup tasks.
For more information about how to call API methods by using obshell-sdk-go, see View cluster-level backup tasks.