Overview
The oceanbase.CDB_OB_RESTORE_PROGRESS view displays the current execution progress of a physical restore task.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID for the restore task |
| JOB_ID | bigint(20) | NO | Recovery Job ID, Corresponding to a Recovery Task |
| RESTORE_TENANT_NAME | longtext | NO | Tenant name to be restored |
| RESTORE_TENANT_ID | bigint(20) | NO | Tenant ID to be Restored |
| BACKUP_TENANT_NAME | longtext | NO | Name of the source tenant for backup |
| BACKUP_TENANT_ID | longtext | NO | Source Tenant ID for Backup |
| BACKUP_CLUSTER_NAME | longtext | NO | Source cluster name for backup |
| BACKUP_DEST | longtext | NO | Backup set path, which refers to the data backup path and log archive path entered by the user. |
| RESTORE_OPTION | longtext | NO | The restore options specified by the user when initiating the restore. restore_option |
| RESTORE_TYPE | varchar(4096) | NO | The recovery type.
|
| RESTORE_SCN | bigint(20) unsigned | NO | User-specified restore point |
| RESTORE_SCN_DISPLAY | varchar(26) | NO | The timestamp of the user-specified restore point is represented as |
| STATUS | longtext | NO | Recovery status: The recovery task status of the system tenant is inconsistent with that of the tenant being recovered. System tenant:
Restored tenant:
|
| START_TIMESTAMP | varchar(26) | NO | Restored Task Start Timestamp |
| BACKUP_SET_LIST | longtext | NO | List of data backup set paths to restore. Separate backup sets with commas (,). , Separate them with commas, for example: file:///data/nfs/backup/data/backup_set_1_full,file:///data/nfs/backup/data/backup_set_2_inc |
| BACKUP_PIECE_LIST | longtext | NO | List of log archive paths for dependency recovery. Shards are separated by , Separate them with commas. Example: file:///data/nfs/backup/archive/2_1_2,file:///data/nfs/backup/archive/2_1_3 |
| RECOVER_SCN | bigint(20) unsigned | NO | The log restore point. For the sys tenant, the value of this field is NULL |
| RECOVER_SCN_DISPLAY | datetime(6) | NO | The timestamp of the point in time to which logs are restored. For the system tenant, the value of this field is NULL |
| RECOVER_PROGRESS | decimal(6,2) | NO | The progress of log restore, with results rounded to two decimal places. For example: displays as 87.65 Indicates that the current progress is 87.65%. For the sys tenant, the value of this field is NULL |
| TABLET_COUNT | bigint(20) | NO | Total number of tablets to be restored. For the sys tenant, the value of this field is NULL |
| FINISH_TABLET_COUNT | bigint(20) | NO | Total number of restored tablets. For the sys tenant, the value of this field is NULL |
| RESTORE_PROGRESS | decimal(6,2) | NO | Data recovery progress, rounded to two decimal places. For example: 87.65 Indicates that the current progress is 87.65%. For the sys tenant, the value of this field is NULL |
| TOTAL_BYTES | bigint(20) | NO | Total Bytes Restored |
| TOTAL_BYTES_DISPLAY | varchar(27) | NO | Total bytes restored, displayed in storage capacity units |
| FINISH_BYTES | bigint(20) | NO | Number of bytes restored |
| FINISH_BYTES_DISPLAY | varchar(27) | NO | Number of bytes restored, in storage capacity units |
| DESCRIPTION | longtext | NO | Specified in the restore command DESCRIPTION Information |
Sample query
View the current execution progress of a physical restore task for 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
Here, tenant_name is the name of the new tenant 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_TYPE: FULL
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
References
View all completed tenant-level restore tasks for a tenant: CDB_OB_RESTORE_HISTORY
For detailed operations and descriptions on viewing the physical restore progress, see View the physical restore progress.