Note
This view is available starting with V4.0.0.
Purpose
This view displays the history of backup jobs for the current tenant.
Columns
| Column | Column | Nullable | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JOB_ID | bigint(20) | NO | This field stores the unique identifier of a backup job task. Each backup job task corresponds to a single record. | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | INCARNATION | bigint(20) | NO | The number of the incarnation of the Flashback Database. | ||
| BACKUP_SET_ID | bigint(20) | YES | The ID of the backup set. For the sys tenant, the value is 0. For other tenants, the value is an incremental value starting from 1. | ||||||||||
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the tenant that initiated the task. It indicates the tenant for which the backup SQL statement was executed. | ||||||||||
| INITIATOR_JOB_ID | bigint(20) | NO | The job ID of the task initiator. | ||||||||||
| EXECUTOR_TENANT_ID | varchar(65536) | NO | The ID of the tenant where the backup task is to be performed. | ||||||||||
| PLUS_ARCHIVELOG | varchar(4096) | NO | Whether the log fill-in feature is enabled:
|
||||||||||
| BACKUP_TYPE | varchar(4096) | NO | Backup type:
|
||||||||||
| JOB_LEVEL | varchar(4096) | NO | The job level. Valid values:
|
||||||||||
| ENCRYPTION_MODE | varchar(4096) | YES | Encryption mode:
Only None and Password modes are supported at present. |
||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | PASSWD | varchar(4096) | YES | Password. | ||
| START_TIMESTAMP | timestamp(6) | NO | The start time of the job-level backup task. | ||||||||||
| END_TIMESTAMP | timestamp(6) | NO | End time of job-level backup task | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | STATUS | varchar(4096) | NO | Backup status. | ||
| RESULT | bigint(20) | NO | The error code. | ||||||||||
| COMMENT | varchar(4096) | YES | description of the error code | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | DESCRIPTION | varchar(4096) | YES | User-specified backup description. | ||
| PATH | varchar(4096) | YES | Backup path |
Sample query
The user can view the history of backup jobs in their own tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_JOB_HISTORY \G
The query result is as follows:
*************************** 1. row ***************************
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 ***************************
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
To view the backup job of the current tenant, query the DBA_OB_BACKUP_JOBS view.
View task-level backup tasks in the current tenant: DBA_OB_BACKUP_TASKS
View the history of task-level backups for the current tenant: DBA_OB_BACKUP_TASK_HISTORY
For more information, see View data backup progress.