Note
This view is available starting with V2.2.77.
Purpose
This view displays the current execution progress of a physical restore task.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant that initiated the restore task. |
| JOB_ID | bigint(20) | NO | The ID of the restore task. |
| RESTORE_TENANT_NAME | longtext | NO | The name of the tenant to be restored. |
| RESTORE_TENANT_ID | bigint(20) | NO | The ID of the tenant to be restored. |
| BACKUP_TENANT_NAME | longtext | NO | The name of the source tenant. |
| BACKUP_TENANT_ID | longtext | NO | The ID of the source tenant. |
| BACKUP_CLUSTER_NAME | longtext | NO | The name of the source cluster. |
| BACKUP_DEST | longtext | NO | The backup set path, which is the data backup path and log archive path specified by the user. |
| RESTORE_OPTION | longtext | NO | The restore option specified by the user when initiating the restore task. |
| RESTORE_TYPE | varchar(4096) | NO | The restore type. Valid values:
NoteThis column is available starting with V4.3.5 BP1. |
| RESTORE_SCN | bigint(20) unsigned | NO | The restore point specified by the user. |
| RESTORE_SCN_DISPLAY | varchar(26) | NO | The timestamp of the restore point specified by the user. |
| STATUS | longtext | NO | The restore status. The status of the restore task of the system tenant and the tenant to be restored may be inconsistent. System tenant:
Tenant to be restored:
|
| START_TIMESTAMP | varchar(26) | NO | The timestamp when the restore task started. |
| BACKUP_SET_LIST | longtext | NO | The list of data backup set paths on which the restore task depends. The backup sets are separated 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 | The list of log archive shard paths on which the restore task depends. The shards are separated with commas (,). For 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 system tenant, this column is NULL
Note
|
| RECOVER_SCN_DISPLAY | datetime(6) | NO | The timestamp of the log restore point. For the system tenant, this column is NULL
Note
|
| RECOVER_PROGRESS | decimal(6,2) | NO | The restore progress of the log. The value is rounded to two decimal places. For example, 87.65 indicates that the restore progress is 87.65%. For the system tenant, this column is NULL
Note
|
| TABLET_COUNT | bigint(20) | NO | The total number of tablets to be restored. For the system tenant, this column is NULL
Note
|
| FINISH_TABLET_COUNT | bigint(20) | NO | The total number of tablets that have completed the restore. For system tenants, the value of this column is NULL.
Note
|
| RESTORE_PROGRESS | decimal(6,2) | NO | The restore progress, with two decimal places. For example, 87.65 indicates that the restore progress is 87.65%. For system tenants, the value of this column is NULL.
Note
|
| TOTAL_BYTES | bigint(20) | NO | The total number of bytes to be restored. |
| TOTAL_BYTES_DISPLAY | varchar(27) | NO | The total number of bytes to be restored, displayed in storage unit. |
| FINISH_BYTES | bigint(20) | NO | The number of bytes that have been restored. |
| FINISH_BYTES_DISPLAY | varchar(27) | NO | The number of bytes that have been restored, displayed in storage unit. |
| DESCRIPTION | longtext | NO | The DESCRIPTION specified in the restore command. |
Sample query
Query 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
In this example, tenant_name specifies 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