Overview
Displays the historical information of backup cleanup tasks executed under all tenants.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| JOB_ID | bigint(20) | NO | Task ID, which is monotonically increasing. |
| INCARNATION | bigint(20) | NO | Avatar ID |
| INITIATOR_TENANT_ID | bigint(20) | NO | Tenant ID that initiated the job |
| INITIATOR_JOB_ID | bigint(20) | NO | JOB ID of the tenant that initiated this job |
| EXECUTOR_TENANT_ID | varchar(65536) | NO | List of Tenants for Which the Cleanup Task Is to Be Performed |
| TYPE | varchar(64) | NO | Cleanup type:
|
| PARAMETER | timestamp(6) | NO | Cleanup parameters, describing the specific parameter information for different cleanup types |
| JOB_LEVEL | varchar(64) | NO | Task Initiation Level:
|
| START_TIMESTAMP | timestamp(6) | NO | Current Tenant Time at Task Start |
| END_TIMESTAMP | timestamp(6) | NO | Current Tenant Time at Task End |
| STATUS | varchar(64) | NO | Task status:
|
| TASK_COUNT | bigint(20) | YES | Number of backup_set/piece Tasks |
| SUCCESS_TASK_COUNT | bigint(20) | YES | Number of Successfully Executed Tasks for backup_set/piece |
| RESULT | bigint(20) | NO | Error Code |
| COMMENT | varchar(4096) | YES | Task Execution Instructions |
Sample query
The system tenant displays the historical information of completed backup cleanup tasks for all tenants, showing the first five records.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_DELETE_JOB_HISTORY LIMIT 5\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
JOB_ID: 7
INCARNATION: 1
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 7
EXECUTOR_TENANT_ID: 1002
TYPE: DELETE OBSOLETE BACKUP
PARAMETER: expired_time:2025-09-09 17:33:46.374127
JOB_LEVEL: USER_TENANT
START_TIMESTAMP: 2025-09-09 17:33:46.377760
END_TIMESTAMP: 2025-09-09 17:33:46.426616
STATUS: COMPLETED
TASK_COUNT: 0
SUCCESS_TASK_COUNT: 0
RESULT: 0
COMMENT:
*************************** 2. row ***************************
TENANT_ID: 1002
JOB_ID: 8
INCARNATION: 1
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 8
EXECUTOR_TENANT_ID: 1002
TYPE: DELETE OBSOLETE BACKUP
PARAMETER: expired_time:2025-09-09 18:33:46.641517
JOB_LEVEL: USER_TENANT
START_TIMESTAMP: 2025-09-09 18:33:46.645269
END_TIMESTAMP: 2025-09-09 18:33:46.692936
STATUS: COMPLETED
TASK_COUNT: 0
SUCCESS_TASK_COUNT: 0
RESULT: 0
COMMENT:
*************************** 3. row ***************************
TENANT_ID: 1002
JOB_ID: 9
INCARNATION: 1
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 9
EXECUTOR_TENANT_ID: 1002
TYPE: DELETE OBSOLETE BACKUP
PARAMETER: expired_time:2025-09-10 19:33:46.913048
JOB_LEVEL: USER_TENANT
START_TIMESTAMP: 2025-09-10 19:33:46.916564
END_TIMESTAMP: 2025-09-10 19:33:46.964739
STATUS: COMPLETED
TASK_COUNT: 0
SUCCESS_TASK_COUNT: 0
RESULT: 0
COMMENT:
*************************** 4. row ***************************
TENANT_ID: 1002
JOB_ID: 10
INCARNATION: 1
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 10
EXECUTOR_TENANT_ID: 1002
TYPE: DELETE OBSOLETE BACKUP
PARAMETER: expired_time:2025-09-09 20:33:47.194699
JOB_LEVEL: USER_TENANT
START_TIMESTAMP: 2025-09-10 20:33:47.199112
END_TIMESTAMP: 2025-09-10 20:33:47.252810
STATUS: COMPLETED
TASK_COUNT: 0
SUCCESS_TASK_COUNT: 0
RESULT: 0
COMMENT:
*************************** 5. row ***************************
TENANT_ID: 1002
JOB_ID: 11
INCARNATION: 1
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 11
EXECUTOR_TENANT_ID: 1002
TYPE: DELETE OBSOLETE BACKUP
PARAMETER: expired_time:2025-09-09 21:33:47.474197
JOB_LEVEL: USER_TENANT
START_TIMESTAMP: 2025-09-10 21:33:47.477776
END_TIMESTAMP: 2025-09-10 21:33:47.527881
STATUS: COMPLETED
TASK_COUNT: 0
SUCCESS_TASK_COUNT: 0
RESULT: 0
COMMENT:
5 rows in set
References
View the execution progress of a job task that is cleaning up ongoing backups: CDB_OB_BACKUP_DELETE_JOBS
View the progress of backup cleanup tasks in progress: CDB_OB_BACKUP_DELETE_TASKS
View the history information of a backup cleanup task: CDB_OB_BACKUP_DELETE_TASK_HISTORY
For detailed operations on setting Automatic cleanup of expired backups, see Automatic cleanup of expired backups.