Note
This view is available starting with V4.0.0.
Purpose
This view displays task-level backup tasks for all tenants in the cluster. Each task record corresponds to a backup_set backup. Task records and job records are in a one-to-one relationship.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| TASK_ID | bigint(20) | NO | The task ID of a backup set. |
| JOB_ID | bigint(20) | NO | The job ID to which the task belongs. |
| INCARNATION | bigint(20) | NO | The number of incarnations after a flashback database operation. |
| BACKUP_SET_ID | bigint(20) | NO | The ID of the backup set to which the task belongs. |
| START_TIMESTAMP | timestamp(6) | NO | The start time of the task. |
| END_TIMESTAMP | timestamp(6) | NO | The end time of the task. |
| STATUS | varchar(4096) | NO | The status of the backup. |
| START_SCN | bigint(20) unsigned | NO | The SCN at which the backup started. |
| END_SCN | bigint(20) unsigned | NO | The SCN at which the backup ended. |
| USER_LS_START_SCN | bigint(20) unsigned | NO | The SCN of the backup log stream meta data. |
| ENCRYPTION_MODE | varchar(4096) | YES | The encryption mode. Valid values:
Currently, only the None and Password modes are supported. |
| PASSWD | varchar(4096) | YES | The password. |
| INPUT_BYTES | bigint(20) | YES | The number of input bytes. |
| OUTPUT_BYTES | bigint(20) | YES | The number of output bytes. |
| OUTPUT_RATE_BYTES | decimal(28,4) | NO | The number of output bytes per second. |
| EXTRA_META_BYTES | bigint(20) | YES | The number of extra bytes. |
| TABLET_COUNT | bigint(20) | YES | The total number of tablets. |
| FINISH_TABLET_COUNT | bigint(20) | YES | The total number of tablets that have been backed up. |
| MACRO_BLOCK_COUNT | bigint(20) | YES | The total number of macroblocks. |
| FINISH_MACRO_BLOCK_COUNT | bigint(20) | YES | The total number of macroblocks that have been backed up. |
| FILE_COUNT | bigint(20) | YES | The total number of backup files. |
| META_TURN_ID | bigint(20) | YES | The turn number of the backup meta data. |
| DATA_TURN_ID | bigint(20) | YES | The turn number of the backup data. |
| RESULT | bigint(20) | YES | The backup error code. |
| COMMENT | varchar(4096) | YES | The description of the error code. |
| PATH | varchar(4096) | YES | The backup path. |
| MINOR_TURN_ID | bigint(20) | NO | The turn number at which the minor data backup ended. |
| MAJOR_TURN_ID | bigint(20) | NO | The turn number at which the major data backup ended. |
| DATA_PROGRESS | decimal(26,2) | NO | The backup progress of the data. The calculation method is number of completed macroblocks / total number of macroblocks, and the result is rounded to two decimal places. For example, 87.65 indicates that the backup progress is 87.65%.
Note
|
| LOG_FILE_COUNT | bigint(20) | NO | The total number of archived clog files.
NoteThis field is available starting with V4.3.1. |
| FINISH_LOG_FILE_COUNT | bigint(20) | NO | The number of archived clog files that have been backed up.
NoteThis field is available starting with V4.3.1. |
| LOG_PROGRESS | decimal(26,2) | NO | The backup progress of the clog files. The value is calculated as number of archived clog files that have been backed up / total number of archived clog files, and is rounded to two decimal places. For example, 87.65 indicates that the backup progress is 87.65%.
NoteThis column is available starting with V4.3.1. |
Sample query
Query all tenant-level backup tasks in the cluster in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_TASKS\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
TASK_ID: 2
JOB_ID: 2
INCARNATION: 1
BACKUP_SET_ID: 2
START_TIMESTAMP: 2024-05-09 17:54:07.718856
END_TIMESTAMP: NULL
STATUS: BACKUP_DATA_MINOR
START_SCN: 1715248462749288000
END_SCN: 0
USER_LS_START_SCN: 1715248476694964000
ENCRYPTION_MODE: NONE
PASSWD:
INPUT_BYTES: 42541347
OUTPUT_BYTES: 7836541
OUTPUT_RATE_BYTES: 0.0000
EXTRA_META_BYTES: 0
TABLET_COUNT: 668
FINISH_TABLET_COUNT: 6
MACRO_BLOCK_COUNT: 81
FINISH_MACRO_BLOCK_COUNT: 20
FILE_COUNT: 0
META_TURN_ID: 1
DATA_TURN_ID: 0
RESULT: 0
COMMENT:
PATH: file:///home/admin/oceanbase/backupdata
MINOR_TURN_ID: 1
MAJOR_TURN_ID: 1
DATA_PROGRESS: 24.69
LOG_FILE_COUNT: 0
FINISH_LOG_FILE_COUNT: 0
LOG_PROGRESS: 0.00
1 row in set
References
View all tenant-level backup jobs: CDB_OB_BACKUP_JOBS
View the history of all tenant-level backup jobs: CDB_OB_BACKUP_JOB_HISTORY
View the history of all tenant-level backup tasks: CDB_OB_BACKUP_TASK_HISTORY
For more information about how to view the data backup progress, see View the data backup progress.