Note
This view is available starting with V4.0.0.
Purpose
This view displays the history records of the backup tasks for all tenants in the cluster.
Columns
| Column | Column | Nullable | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TENANT_ID | bigint(20) | NO | tenant id | ||||||||||
| JOB_ID | bigint(20) | NO | The ID of the backup job. Each backup task record corresponds to one backup job. | ||||||||||
| INCARNATION | bigint(20) | NO | Number of Flashback Database incarnations. | ||||||||||
| BACKUP_SET_ID | bigint(20) | YES | the ID of the backup set. For the sys tenant, the default value is 0. For other tenants, the value starts from 1 and increments by 1 for each new backup set. | ||||||||||
| INITIATOR_TENANT_ID | bigint(20) | NO | The tenant ID of the task initiator. The value indicates the tenant that initiated the task, which is the tenant ID of the tenant that executed the backup SQL statement. | ||||||||||
| INITIATOR_JOB_ID | bigint(20) | NO | Job ID of the task initiator | ||||||||||
| EXECUTOR_TENANT_ID | varchar(65536) | NO | The ID of the tenant for which the backup task is to be executed. | ||||||||||
| PLUS_ARCHIVELOG | varchar(4096) | NO | Whether to enable the archiving log function. Valid values are ON and OFF.
|
||||||||||
| BACKUP_TYPE | varchar(4096) | NO | The backup type. Valid values:
|
||||||||||
| JOB_LEVEL | varchar(4096) | NO | The job level. Valid values:
|
||||||||||
| ENCRYPTION_MODE | varchar(4096) | YES | The encryption mode. Valid values:
This column only supports the None and Password values. |
||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | PASSWD | varchar(4096) | YES | Password | ||
| START_TIMESTAMP | timestamp(6) | NO | The start time of a backup task. | ||||||||||
| END_TIMESTAMP | timestamp(6) | NO | The end time of a job-level backup task. | ||||||||||
| Column | Type | Nullable | Description | STATUS | varchar(4096) | NO | The backup status. | ||||||
| RESULT | bigint(20) | NO | The result of the backup error code. | ||||||||||
| Comment | varchar(4096) | YES | Error code description | ||||||||||
| DESCRIPTION | varchar(4096) | YES | The description of the backup information specified by the user. | ||||||||||
| PATH | varchar(4096) | YES | Backup path |
Sample query
In the Super Tenant database, query the history of backup jobs for the tenant with tenant ID 1002.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_JOB_HISTORY WHERE TENANT_ID = 1002\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
JOB_ID: 1
INCARNATION: 1
BACKUP_SET_ID: 1
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 0
EXECUTOR_TENANT_ID: 1002
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: FULL
JOB_LEVEL: USER_TENANT
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-07 14:02:11.456564
END_TIMESTAMP: 2025-01-07 14:04:31.184971
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION:
PATH: file:///home/admin/oceanbase/backupdata
*************************** 2. row ***************************
TENANT_ID: 1002
JOB_ID: 2
INCARNATION: 1
BACKUP_SET_ID: 2
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 0
EXECUTOR_TENANT_ID: 1002
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: FULL
JOB_LEVEL: USER_TENANT
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-07 14:24:12.797543
END_TIMESTAMP: 2025-01-07 14:26:22.479357
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION:
PATH: file:///home/admin/oceanbase/backupdata
2 rows in set
References
Query all backup jobs for all tenants: CDB_OB_BACKUP_JOBS
View Task-level backup tasks for all tenants: CDB_OB_BACKUP_TASKS
View the history of all tenant-level backup tasks: CDB_OB_BACKUP_TASK_HISTORY
For more information about how to view the progress of a data backup, see View the data backup progress.