Note
This view is available starting with V4.0.0.
Purpose
This view displays the historical records of all tenant backup jobs in a cluster.
Columns
| Column | Type | Nullable | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Column | Type | Nullable | Description | --- | --- | --- | --- | TENANT_ID | bigint(20) | NO | The tenant ID. | ||
| JOB_ID | bigint(20) | NO | The ID of a backup job task. Each backup task corresponds to one record. | ||||||||||
| INCARNATION | bigint(20) | NO | The number of times the database is forked after a Flashback Database operation. | ||||||||||
| BACKUP_SET_ID | bigint(20) | YES | This field indicates the ID of the backup set. For the sys tenant, the value is 0 by default. For the other tenants, the value is increased from 1. | ||||||||||
| INITIATOR_TENANT_ID | bigint(20) | NO | The tenant ID of the task initiator, representing the tenant that initiated the task. This corresponds to the tenant ID executing the backup SQL command. | ||||||||||
| INITIATOR_JOB_ID | bigint(20) | NO | The job ID of the initiator. | ||||||||||
| EXECUTOR_TENANT_ID | varchar(65536) | NO | The ID of the tenant to be backed up for the job-level backup task. | ||||||||||
| PLUS_ARCHIVELOG | varchar(4096) | NO | The value indicates whether the log replenishment feature is enabled: |
||||||||||
| BACKUP_TYPE | varchar(4096) | NO | Backup type: |
||||||||||
| COLUMN | TYPE | NULLABLE | DESCRIPTION | --- | --- | --- | --- | JOB_LEVEL | varchar(4096) | NO | The level of the job. Valid values: |
||
| ENCRYPTION_MODE | varchar(4096) | YES | Specifies the encryption mode. Valid values: At present, only None and Password are supported. |
||||||||||
| PASSWD | varchar(4096) | YES | Password | ||||||||||
| START_TIMESTAMP | timestamp(6) | NO | Time when a backup at job level starts | ||||||||||
| END_TIMESTAMP | timestamp(6) | NO | The time when a job-level backup task is completed. | ||||||||||
| STATUS | varchar(4096) | NO | The backup status | ||||||||||
| COLUMN | Type | Nullable | Description | --- | --- | --- | --- | RESULT | bigint(20) | NO | The backup error code. | ||
| Column | Type | Nullable | Description | --- | --- | --- | --- | COMMENT | varchar(4096) | YES | Error code description | ||
| DESCRIPTION | varchar(4096) | YES | User-specified description information for the backup | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | PATH | varchar(4096) | YES | Backup path. |
Sample query
The system tenant views the historical records of backup jobs for 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