Note
This view is available starting with V4.0.0.
Purpose
This view displays the historical information of completed backup_set/backup_piece cleanup tasks 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: backup_set and piece. |
| ID | bigint(20) | NO | The task ID. Valid values: backup_set and piece. |
| ROUND_ID | bigint(20) | NO | The dest_round_id of the piece. For the cleanup of a backup_set, the value of ROUND_ID is 0. |
| DEST_ID | bigint(20) | NO | The DEST_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 completed. |
| 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 historical information of completed backup_set or backup_piece cleanup tasks in the current user tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_DELETE_TASK_HISTORY\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: 2022-06-01 12:09:56.283804
STATUS: COMPLETED
TOTAL_LS_COUNT: 2
FINISH_LS_COUNT: 2
RESULT: 0
COMMENT:
PATH: file:///data/nfs/backup/archive
2 rows in set