Note
This view is available starting with V4.0.0.
Purpose
This view displays Task-level backup history for a specific user tenant.
Columns
| Column | Column | Column | Column | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK_ID | bigint(20) | NO | The task ID for a backup task at the TASK level. A backup task corresponds to a backup set. | ||||||||||
| JOB_ID | bigint(20) | NO | The ID of the task. The task is part of a job. | ||||||||||
| JOB_ID | |||||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | INCARNATION | bigint(20) | NO | The number of incarnations after the Flashback Database operation. | ||
| BACKUP_SET_ID | bigint(20) | NO | The ID of the backup set corresponding to the task. | ||||||||||
| 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 when the backup started. | ||||||||||
| END_SCN | bigint(20) unsigned | NO | SCN where the backup ends | ||||||||||
| USER_LS_START_SCN | bigint(20) unsigned | NO | The SCN in the log stream meta-data. | ||||||||||
| ENCRYPTION_MODE | varchar(4096) | YES | The encryption mode. Valid values: None, Password, Password Encryption, Transparent Encryption, and Dual mode Encryption. None indicates no encryption. Password indicates that only password protection is used. Password Encryption indicates that encryption and password protection are used. Transparent Encryption indicates that Transparent Data Encryption (TDE) is used. Dual mode Encryption indicates that TDE encryption and password protection are used. | ||||||||||
| PASSWD | varchar(4096) | YES | 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 | Output rate in bytes per second. | ||||||||||
| EXTRA_META_BYTES | bigint(20) | YES | The extra number of bytes | ||||||||||
| TABLET_COUNT | bigint(20) | YES | Tablet total number | ||||||||||
| FINISH_TABLET_COUNT | bigint(20) | YES | The total number of TABLETs that have been backed up. | ||||||||||
| MACRO_BLOCK_COUNT | bigint(20) | YES | Number of macroblocks. | ||||||||||
| FINISH_MACRO_BLOCK_COUNT | bigint(20) | YES | The number of macroblocks completed during the backup. | ||||||||||
| FILE_COUNT | bigint(20) | YES | Number of backup files | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | META_TURN_ID | bigint(20) | YES | The backup rounds of the meta data. | ||
| DATA_TURN_ID | bigint(20) | YES | Backup round for data | ||||||||||
| RESULT | bigint(20) | YES | Backup error code | ||||||||||
| COMMENT | varchar(4096) | YES | Error code description | ||||||||||
| PATH | varchar(4096) | YES | Backup path | ||||||||||
| MINOR_TURN_ID | bigint(20) | NO | The minor compaction end turn. | ||||||||||
| MAJOR_TURN_ID | bigint(20) | NO | The backup round. |
Sample query
User tenants can view the history of backup tasks at the task level.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_TASK_HISTORY \G
The query result is as follows:
*************************** 1. row ***************************
TASK_ID: 1
JOB_ID: 1
INCARNATION: 1
BACKUP_SET_ID: 1
START_TIMESTAMP: 2025-01-07 14:02:11.456564
END_TIMESTAMP: 2025-01-07 14:04:31.155906
STATUS: COMPLETED
START_SCN: 1736229737396159000
END_SCN: 1736229871129903000
USER_LS_START_SCN: 1736229748325655000
ENCRYPTION_MODE: NONE
PASSWD:
INPUT_BYTES: 217101469
OUTPUT_BYTES: 22114592
OUTPUT_RATE_BYTES: 158301.3326
EXTRA_META_BYTES: 0
TABLET_COUNT: 680
FINISH_TABLET_COUNT: 680
MACRO_BLOCK_COUNT: 103
FINISH_MACRO_BLOCK_COUNT: 103
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
*************************** 2. row ***************************
TASK_ID: 2
JOB_ID: 2
INCARNATION: 1
BACKUP_SET_ID: 2
START_TIMESTAMP: 2025-01-07 14:24:12.797543
END_TIMESTAMP: 2025-01-07 14:26:22.451703
STATUS: COMPLETED
START_SCN: 1736231071297670000
END_SCN: 1736231182431006000
USER_LS_START_SCN: 1736231080783109000
ENCRYPTION_MODE: NONE
PASSWD:
INPUT_BYTES: 229685436
OUTPUT_BYTES: 20673067
OUTPUT_RATE_BYTES: 159447.7724
EXTRA_META_BYTES: 0
TABLET_COUNT: 680
FINISH_TABLET_COUNT: 680
MACRO_BLOCK_COUNT: 109
FINISH_MACRO_BLOCK_COUNT: 109
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
2 rows in set