Note
This view is available starting with V4.0.0.
Purpose
Purpose This view displays the history of backup JOB tasks for the current tenant.
Columns
| Column | Column | Nullable | Column | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JOB_ID | bigint(20) | NO | The backup job ID. Each backup task corresponds to a record in this view. | ||||||||||
| INCARNATION | bigint(20) | NO | Indicates the number of incarnations after the flashback database operation. | ||||||||||
| BACKUP_SET_ID | bigint(20) | YES | This column stores the ID of the backup set. The sys tenant has a value of 0, and the IDs of common tenants start from 1. | ||||||||||
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the initiator tenant, which indicates the tenant that initiated the task and also corresponds to the tenant ID of the tenant that executed the backup SQL command. | ||||||||||
| INITIATOR_JOB_ID | bigint(20) | NO | The job ID of the task initiator. | ||||||||||
| FIELD NAME | TYPE | NULLABLE | DESCRIPTION | --- | --- | --- | --- | EXECUTOR_TENANT_ID | varchar(65536) | NO | The ID of the tenant for which the backup task at the job level is executed. | ||
| PLUS_ARCHIVELOG | varchar(4096) | NO | This parameter indicates whether to enable archive log filling in. The value is the following options:
|
||||||||||
| BACKUP_TYPE | varchar(4096) | NO | Backup type:
|
||||||||||
| JOB_LEVEL | varchar(4096) | NO | JOB level:
|
||||||||||
| ENCRYPTION_MODE | varchar(4096) | YES | The encryption mode. Valid values:
|
||||||||||
| passwd | varchar(4096) | YES | password | ||||||||||
| START_TIMESTAMP | timestamp(6) | NO | The start time of the backup job. | ||||||||||
| END_TIMESTAMP | timestamp(6) | NO | End time of the backup task at the job level | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | STATUS | varchar(4096) | NO | Backup status. | ||
| RESULT | bigint(20) | NO | The result. | RESULT | bigint(20) | NO | The result. | ||||||
| COMMENT | varchar(4096) | YES | Error code description | ||||||||||
| COLUMN | TYPE | NULLABLE | DESCRIPTION | ------ | ------ | ------ | ------ | DESCRIPTION | varchar(4096) | YES | User-specified backup description information | ||
| PATH | varchar(4096) | YES | The path for the backup. |
Sample query
Sample query select * from dms_job_history where tenant_id = '<tenant_id>'; ## References
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
View the backup jobs of the current tenant: DBA_OB_BACKUP_JOBS
View Task-level backups of the current tenant: DBA_OB_BACKUP_TASKS
View the Task-level backup tasks of a specific tenant: DBA_OB_BACKUP_TASK_HISTORY
For more information about how to view the data backup progress, see View the data backup progress.
