This topic describes how to view information about a backup task for a tenant through the API.
API constraints
If a password is set, you must authenticate. For more information, see API hybrid encryption.
Request syntax
GET /api/v1/tenant/:name/backup/overview
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request is successful. |
| timestamp | time.Time | The timestamp when the server completed the request. |
| duration | int | The time (in milliseconds) taken by the server to process the request. |
| status | int | The HTTP status code. |
| traceId | string | The Trace ID of the request. |
| data | CdbObBackupTask | The backup task information. |
| error | ApiError | The error information returned by the request, which contains the following fields:
|
The CdbObBackupTask data structure is described as follows:
| Parameter | Type | Description |
|---|---|---|
| tenant_id | int | The tenant ID. |
| task_id | int | The ID of the task-level backup task corresponding to a backup set. |
| job_id | int | The JOB_ID of the task. |
| incarnation | int | The number of times the Flashback Database has been restored. |
| 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 log stream META of the backup. |
| 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 tablets that have been backed up. |
| macro_block_count | int | The total number of macro blocks. |
| finish_macro_block_count | int | The total number of macro blocks that have been backed up. |
| file_count | int | The total number of backup files. |
| meta_turn_id | int | The number of the backup META round. |
| data_turn_id | int | The number of the backup DATA round. |
| result | int | The backup error code. |
| comment | string | The description of the error code. |
| path | string | The backup path. |
Examples
Sample request
GET 10.10.10.1:2886/api/v1/tenant/tenant1/backup/overview
Sample response
{
"successful": true,
"timestamp": "2024-10-12T18:16:17.54002369+08:00",
"duration": 36,
"status": 200,
"traceId": "11ae266d93f6e7c7",
"data": {
"status": {
"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"
}
}
}
References
You can also call the API through SDK methods.
For more information about how to call the API through the obshell-sdk-python, see View information about a backup task for a tenant.
For more information about how to call the API through the obshell-sdk-go, see View information about a backup task for a tenant.