Note
This view was introduced in OceanBase Database V4.0.0.
Purpose
The oceanbase.CDB_OB_BACKUP_TASKS view displays the backup tasks in all tenants in the cluster. A task record is generated for each backup set. The task records and job records are in one-to-one mapping.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| TASK_ID | bigint(20) | NO | The ID of the backup task, which corresponds to a backup set task. |
| JOB_ID | bigint(20) | NO | The job ID of the backup task. |
| INCARNATION | bigint(20) | NO | The nth incarnation of the database after the Flashback Database operation. |
| BACKUP_SET_ID | bigint(20) | NO | The ID of the backup set corresponding to the backup task. |
| START_TIMESTAMP | timestamp(6) | NO | The start time of the backup task. |
| END_TIMESTAMP | timestamp(6) | NO | The end time of the backup task. |
| STATUS | varchar(4096) | NO | The backup status. |
| START_SCN | bigint(20) unsigned | NO | The system change number (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 metadata of the backup log stream. |
| ENCRYPTION_MODE | varchar(4096) | YES | The encryption mode. Valid values:None: indicates that encryption is not implemented.Password: indicates that only the password is used for protection.Password Encryption: indicates that encryption is implemented and the password is used for protection.Transparent Encryption: indicates that transparent data encryption (TDE) is used for encryption.Dual Mode Encryption: indicates that TDE encryption is implemented and the password is used for protection.At present, 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 bytes that are output 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 backed up. |
| MACRO_BLOCK_COUNT | bigint(20) | YES | The number of macroblocks. |
| FINISH_MACRO_BLOCK_COUNT | bigint(20) | YES | The number of macroblocks backed up. |
| FILE_COUNT | bigint(20) | YES | The number of backup files. |
| META_TURN_ID | bigint(20) | YES | The round of metadata backup. |
| DATA_TURN_ID | bigint(20) | YES | The round of data backup. |
| RESULT | bigint(20) | YES | The returned 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 ID of the round at which the backup of minor compaction data ended. |
| MAJOR_TURN_ID | bigint(20) | NO | The ID of the round at which the backup of baseline data ended. |
| DATA_PROGRESS | decimal(26,2) | NO | The data backup progress, which is calculated by using the following formula: Number of macroblocks that have been backed up/Total number of macroblocks. The value is rounded off to the second decimal place. For example, the value 87.65 indicates that the current backup progress is 87.65%. |
| DATA_PROGRESS | decimal(26,2) | NO | The data backup progress, which is calculated by using the following formula: Number of macroblocks that have been backed up/Total number of macroblocks. The value is rounded off to the second decimal place. For example, the value 87.65 indicates that the current backup progress is 87.65%.
NoteThis column was introduced in OceanBase Database V4.2.1 BP3. |
Sample query
Query the backup progress of backup tasks of all tenants in the cluster.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_TASKS\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
TASK_ID: 1
JOB_ID: 1
INCARNATION: 1
BACKUP_SET_ID: 1
START_TIMESTAMP: 2024-07-29 15:08:41.221174
END_TIMESTAMP: NULL
STATUS: BACKUP_DATA_MINOR
START_SCN: 1722236939903501364
END_SCN: 0
USER_LS_START_SCN: 1722236951143670797
ENCRYPTION_MODE: NONE
PASSWD:
INPUT_BYTES: 90622181
OUTPUT_BYTES: 7451552
OUTPUT_RATE_BYTES: 0.0000
EXTRA_META_BYTES: 0
TABLET_COUNT: 605
FINISH_TABLET_COUNT: 6
MACRO_BLOCK_COUNT: 104
FINISH_MACRO_BLOCK_COUNT: 43
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: 41.35
1 row in set