Note
This view is available starting with V4.0.0.
Purpose
This view displays the history of backup jobs in all tenants of the cluster.
Columns
| Column | Column | Nullable | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Column | Type | Nullable | Description | --- | --- | --- | --- | TENANT_ID | bigint(20) | NO | The tenant ID. | ||
| Field | Type | Nullable | Description | --- | --- | --- | --- | JOB_ID | bigint(20) | NO | The backup task ID. Each backup task corresponds to a unique record. | ||
| INCARNATION | bigint(20) | NO | Displays the number of times that the database was flash-backed since the flashback database was enabled. | ||||||||||
| BACKUP_SET_ID | bigint(20) | YES | The ID of the backup set. For the sys tenant, the default value is 0. For regular tenants, it is an incrementing number starting from 1. | ||||||||||
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the tenant that initiated the task. This field indicates the tenant ID of the tenant that initiated the task, corresponding to the tenant ID that executed the backup SQL command. | ||||||||||
| INITIATOR_JOB_ID | bigint(20) | NO | The job ID of the task initiator. | ||||||||||
| EXECUTOR_TENANT_ID | varchar(65536) | NO | This view displays the tenant ID related to the backup task at the job level. | ||||||||||
| PLUS_ARCHIVELOG | varchar(4096) | NO | Enables log filling:
|
||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | 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:
|
||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | PASSWD | varchar(4096) | YES | Password. | ||
| START_TIMESTAMP | timestamp(6) | NO | The time when the job-level backup task starts. | ||||||||||
| END_TIMESTAMP | timestamp(6) | NO | Job-level backup job end time | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | STATUS | varchar(4096) | NO | Backup status | ||
| RESULT | bigint(20) | NO | The result returned by the backup. | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | COMMENT | varchar(4096) | YES | Description of the error code. | ||
| COLUMN | TYPE | NULLABLE | DESCRIPTION | --- | --- | --- | --- | description | varchar(4096) | YES | User-specified backup description | ||
| Column | Type | Nullable | Description | --- | --- | --- | --- | PATH | varchar(4096) | YES | Backup path. |
Sample query
The sys tenant queries the historical records of the backup jobs in the tenant whose tenant ID is 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
View all tenant backup tasks in the CDB_OB_BACKUP_JOBS view.
View task-level backup tasks of all tenants: CDB_OB_BACKUP_TASKS
View the backup task history at the task level for all tenants: CDB_OB_BACKUP_TASK_HISTORY
For more information about how to view the details of data backup progress, see View data backup progress.
