Note
This view is available starting with V4.0.0.
Purpose
This view displays all backup tasks in the cluster. One task record is generated for each backup task initiated by a user.
Columns
| Column | Type | Nullable | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| COLUMN | TYPE | NULLABLE | DESCRIPTION | TENANT_ID | bigint(20) | NO | The ID of the tenant. | ||||||
| JOB_ID | bigint(20) | NO | The backup job ID. A backup request corresponds to one job record. | ||||||||||
| INCARNATION | bigint(20) | NO | Indicates the number of incarnations after the Flashback Database operation. | ||||||||||
| BACKUP_SET_ID | bigint(20) | YES | The backup set ID. For the sys tenant, the value is 0. For other tenants, the value starts from 1 and increments by 1. | ||||||||||
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the tenant that initiates the task. This value is the ID of the tenant that executes the backup SQL command. | ||||||||||
| 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 performed for a job-level backup task. | ||||||||||
| PLUS_ARCHIVELOG | varchar(4096) | NO | Whether to enable archive log backup:
|
||||||||||
| BACKUP_TYPE | varchar(4096) | NO | The backup type. Valid values:
|
||||||||||
| JOB_LEVEL | varchar(4096) | NO | Level of the backup job:
|
||||||||||
| ENCRYPTION_MODE | varchar(4096) | YES | The encryption mode. Valid values:
|
||||||||||
| COLUMN | VARCHAR(4096) | YES | password | ||||||||||
| START_TIMESTAMP | timestamp(6) | NO | The start time of the backup task at the job level. | ||||||||||
| END_TIMESTAMP | timestamp(6) | NO | The 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 backup error code. | ||||||||||
| COMMENT | varchar(4096) | YES | The error description. | ||||||||||
| DESCRIPTION | varchar(4096) | YES | User-specified backup description. | ||||||||||
| PATH | varchar(4096) | YES | Backup path |
Sample query
The system tenant checks the backup jobs of tenant 1002.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_JOBS WHERE TENANT_ID = 1002\G
The query result is as follows:
*************************** 1. 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: NULL
STATUS: DOING
RESULT: 0
COMMENT:
DESCRIPTION:
PATH: file:///home/admin/oceanbase/backupdata
1 row in set
References
View the history of job-level backups for all tenants: CDB_OB_BACKUP_JOB_HISTORY.
Query tasks at the tenant level: CDB_OB_BACKUP_TASKS.
View the historical records of task-level backups for all tenants: CDB_OB_BACKUP_TASK_HISTORY
For more information about how to view the data backup progress, see View the data backup progress.