Note
This view is available starting with V4.0.0.
Purpose
This view displays information about backup_set/backup_piece cleanup tasks that are being executed in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TASK_ID | bigint(20) | NO | The task group ID, which identifies a group of tasks. |
| INCARNATION | bigint(20) | NO | The incarnation ID. |
| JOB_ID | bigint(20) | NO | The task ID, which corresponds to the ID in the JOB table. |
| TASK_TYPE | varchar(64) | NO | The task type. Valid values:
|
| ID | bigint(20) | NO | The task ID, which includes backup_set and piece. |
| ROUND_ID | bigint(20) | NO | The dest_round_id of the piece. For the backup_set cleanup task, the value of ROUND_ID is 0. |
| DEST_ID | bigint(20) | NO | The destination ID of the backup destination. |
| START_TIMESTAMP | timestamp(6) | NO | The start time of the task. |
| END_TIMESTAMP | timestamp(6) | NO | The end time of the task. |
| STATUS | varchar(64) | NO | The task status. Valid values:
|
| TOTAL_LS_COUNT | bigint(20) | YES | The number of log streams under the task. |
| FINISH_LS_COUNT | bigint(20) | YES | The number of log stream tasks that are successfully executed. |
| RESULT | bigint(20) | YES | The error code. |
| COMMENT | varchar(4096) | YES | The comment. |
| PATH | varchar(1024) | NO | The backup destination of the backup_set or backup_piece. |
Sample query
Query the information about backup_set or backup_piece cleanup tasks that are being executed in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_DELETE_TASKS\G
The query result is as follows:
*************************** 1. row ***************************
TASK_ID: 4
INCARNATION: 1
JOB_ID: 7
TASK_TYPE: BACKUP SET
ID: 1
ROUND_ID: 0
DEST_ID: 1002
START_TIMESTAMP: 2022-06-01 12:09:50.800772
END_TIMESTAMP: 2022-06-01 12:09:54.954691
STATUS: COMPLETED
TOTAL_LS_COUNT: 2
FINISH_LS_COUNT: 2
RESULT: 0
COMMENT:
PATH: file:///data/nfs/backup/data
*************************** 2. row ***************************
TASK_ID: 5
INCARNATION: 1
JOB_ID: 7
TASK_TYPE: BACKUP PIECE
ID: 1
ROUND_ID: 1
DEST_ID: 1001
START_TIMESTAMP: 2022-06-01 12:09:50.968413
END_TIMESTAMP:
STATUS: DOING
TOTAL_LS_COUNT: 2
FINISH_LS_COUNT: 1
RESULT: 0
COMMENT:
PATH: file:///data/nfs/backup/archive
2 rows in set
References
Query the execution progress of backup cleanup jobs that are being executed: DBA_OB_BACKUP_DELETE_JOBS
Query the historical information about backup cleanup jobs: DBA_OB_BACKUP_DELETE_JOB_HISTORY
Query the historical information about backup cleanup tasks: DBA_OB_BACKUP_DELETE_TASK_HISTORY
For more information about how to set the automatic cleanup of expired backups, see Automatically clean up expired backups.