Note
This view was introduced in OceanBase Database V2.2.77.
Purpose
The oceanbase.CDB_OB_RESTORE_PROGRESS view displays the current execution progress of physical restore jobs.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant that performed the restore job. |
| JOB_ID | bigint(20) | NO | The ID of the restore job. |
| RESTORE_TENANT_NAME | longtext | NO | The name of the tenant to restore. |
| RESTORE_TENANT_ID | bigint(20) | NO | The ID of the tenant to be restored. |
| BACKUP_TENANT_NAME | longtext | NO | The name of the backup source tenant. |
| BACKUP_TENANT_ID | longtext | NO | The ID of the backup source tenant. |
| BACKUP_CLUSTER_NAME | longtext | NO | The name of the backup source cluster. |
| BACKUP_DEST | longtext | NO | The backup set paths. The value contains the data backup path and log archive path. |
| RESTORE_OPTION | longtext | NO | The restore option specified when the restore job was initiated. |
| RESTORE_SCN | bigint(20) unsigned | NO | The restore system change number (SCN). |
| RESTORE_SCN_DISPLAY | varchar(26) | NO | The restore SCN displayed as a timestamp. |
| STATUS | longtext | NO | The restore status. The possible states of a restore job in the sys tenant are inconsistent with those in the restored tenant. Valid values for the sys tenant:
Valid values for the target tenant:
|
| START_TIMESTAMP | varchar(26) | NO | The start timestamp of the restore job. |
| BACKUP_SET_LIST | longtext | NO | The backup set paths for the restore, which are separated with commas (,). Here is an example: file:///data/nfs/backup/data/backup_set_1_full,file:///data/nfs/backup/data/backup_set_2_inc. |
| BACKUP_PIECE_LIST | longtext | NO | The paths of log archive pieces for the restore, which are separated with commas (,). Here is an example: file:///data/nfs/backup/archive/piece_d1001r1p1,file:///data/nfs/backup/archive/piece_d1001r2p2. |
| RECOVER_SCN | bigint(20) unsigned | NO | The log restore SCN. The value of this column is NULL in the sys tenant.
Note
|
| RECOVER_SCN_DISPLAY | datetime(6) | NO | The log restore SCN displayed as a timestamp. The value of this column is NULL in the sys tenant.
Note
|
| RECOVER_PROGRESS | decimal(6,2) | NO | The log restore progress. The value is rounded off to the second decimal place. For example, the value 87.65 indicates that the current restore progress is 87.65%. The value of this column is NULL in the sys tenant.
Note
|
| TABLET_COUNT | bigint(20) | NO | The total number of tablets to restore. The value of this column is NULL in the sys tenant.
Note
|
| FINISH_TABLET_COUNT | bigint(20) | NO | The total number of tablets restored. The value of this column is NULL in the sys tenant.
Note
|
| RESTORE_PROGRESS | decimal(6,2) | NO | The data restore progress. The value is rounded off to the second decimal place. For example, the value 87.65 indicates that the current restore progress is 87.65%. The value of this column is NULL in the sys tenant.
Note
|
| TOTAL_BYTES | bigint(20) | NO | The total number of bytes to restore. |
| TOTAL_BYTES_DISPLAY | varchar(27) | NO | The total number of bytes to restore, in a storage capacity unit. |
| FINISH_BYTES | bigint(20) | NO | The total number of bytes restored. |
| FINISH_BYTES_DISPLAY | varchar(27) | NO | The total number of bytes restored, in a storage capacity unit. |
| DESCRIPTION | longtext | NO | The description specified in the restore statement. |
Sample query
Query the current execution progress of physical restore jobs in the mysql tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_RESTORE_PROGRESS WHERE tenant_id IN (SELECT tenant_id FROM oceanbase.DBA_OB_TENANTS WHERE tenant_name='mysql')\G
tenant_name specifies the name of the target tenant to which the data is to be restored.
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1008
JOB_ID: 2
RESTORE_TENANT_NAME: mysql
RESTORE_TENANT_ID: 1008
BACKUP_TENANT_NAME: backup_tenant
BACKUP_TENANT_ID: 1002
BACKUP_CLUSTER_NAME: backup_cluster
BACKUP_DEST: file:///data/nfs/backup//archive,file:///data/nfs/backup/data
RESTORE_OPTION: pool_list=restore_pool&concurrency=50
RESTORE_SCN: 1711091102560245001
RESTORE_SCN_DISPLAY: 2024-03-22 15:05:02.560245
STATUS: RESTORING
START_TIMESTAMP: 2024-03-22 15:06:30.860918
BACKUP_SET_LIST: file:///data/nfs/backup/data/backup_set_1_full
BACKUP_PIECE_LIST: file:///data/nfs/backup/archive/piece_d1001r1p1,file:///data/nfs/backup/archive/piece_d1001r2p2
RECOVER_SCN: 1711084223602400000
RECOVER_SCN_DISPLAY: 2024-03-22 13:10:23.602400
RECOVER_PROGRESS: 72.23
TABLET_COUNT: 1767
FINISH_TABLET_COUNT: 598
RESTORE_PROGRESS: 33.84
TOTAL_BYTES: 23210230
TOTAL_BYTES_DISPLAY: 220.14GB
FINISH_BYTES: 0
FINISH_BYTES_DISPLAY: 0.00MB
DESCRIPTION:
1 rows in set