Note
This view is available starting with V4.0.0.
Purpose
This view displays the historical records of backup jobs of all tenants in the current cluster.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| JOB_ID | bigint(20) | NO | The backup job ID. Each backup job corresponds to one job task record. |
| INCARNATION | bigint(20) | NO | The number of times the database has been flashed back. |
| BACKUP_SET_ID | bigint(20) | YES | The ID of the backup set. For the sys tenant, the value is 0. For other tenants, it starts at 1 and increments for each new backup. |
| INITIATOR_TENANT_ID | bigint(20) | NO | The tenant ID of the initiator of the task. This field indicates the tenant that initiated the task. This field is the ID of the tenant that executed the backup SQL statement. |
| INITIATOR_JOB_ID | bigint(20) | NO | The job ID of the task initiator. |
| EXECUTOR_TENANT_ID | varchar(65536) | NO | The tenant ID that is associated with the backup task at the job level and that needs to be backed up. |
| PLUS_ARCHIVELOG | varchar(4096) | NO | Whether to enable archive log filling: |
| BACKUP_TYPE | varchar(4096) | NO | Backup type:
|
| JOB_LEVEL | varchar(4096) | NO | JOB level. Valid values: |
| ENCRYPTION_MODE | varchar(4096) | YES | Encryption mode: Currently, only None and Password are supported. |
| PASSWD | varchar(4096) | YES | The password. |
| START_TIMESTAMP | timestamp(6) | NO | The start time of the job-level backup task. |
| END_TIMESTAMP | timestamp(6) | NO | The end time of the job-level backup task. |
| STATUS | varchar(4096) | NO | Backup status. |
| RESULT | bigint(20) | NO | Backup error code. |
| COMMENT | varchar(4096) | YES | Error code description. |
| DESCRIPTION | varchar(4096) | YES | User-specified backup description. |
| PATH | varchar(4096) | YES | Backup path. |
Sample query
In a SYS tenant, view the history of a backup job for a 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