This topic describes how to view the progress and results of full restore tasks by using internal tables or in OceanBase Cloud Platform (OCP).
View the restore progress and results in a view
Log on to the
systenant as therootuser.Access the database named
oceanbase.obclient> USE oceanbase;View the restore progress.
Example:
obclient> SELECT * FROM oceanbase.CDB_OB_RESTORE_PROGRESS; +--------+-----------------+-----------+-----------------------+------------------+----------------------+-------------------+---------------------+-------------------------+---------------------+----------------------------+-----------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ | JOB_ID | EXTERNAL_JOB_ID | TENANT_ID | TENANT_NAME | BACKUP_TENANT_ID | BACKUP_TENANT_NAME | BACKUP_CLUSTER_ID | BACKUP_CLUSTER_NAME | WHITE_LIST | STATUS | START_TIME | COMPLETION_TIME | PARTITION_COUNT | MACRO_BLOCK_COUNT | FINISH_PARTITION_COUNT | FINISH_MACRO_BLOCK_COUNT | RESTORE_START_TIMESTAMP | RESTORE_FINISH_TIMESTAMP | RESTORE_CURRENT_TIMESTAMP | BACKUP_SET_LIST | BACKUP_PIECE_LIST | INFO | +--------+-----------------+-----------+-----------------------+------------------+----------------------+-------------------+---------------------+-------------------------+---------------------+----------------------------+-----------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ | 1 | -1 | 1001 | restore_oracle_tenant | 1001 | backup_oracle_tenant | 1 | cluster123 | `TEST`.`T1`,`TEST`.`T2` | RESTORE_SYS_REPLICA | 2021-12-15 20:52:38.283863 | NULL | 128 | -1 | 67 | -1 | 2021-12-15 20:49:55.765179 | 2021-12-15 20:49:55.765179 | NULL | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/data/backup_set_1_full_20211215 | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/clog/1 | | +--------+-----------------+-----------+-----------------------+------------------+----------------------+-------------------+---------------------+-------------------------+---------------------+----------------------------+-----------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ 1 row in setAfter the restore task is completed, execute the following statements to view the restore results and history.
View the restore results.
Example:
obclient> SELECT * FROM oceanbase.CDB_OB_RESTORE_PROGRESS; +--------+-----------------+-----------+-----------------------+------------------+----------------------+-------------------+---------------------+------------+----------------------+----------------------------+-----------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ | JOB_ID | EXTERNAL_JOB_ID | TENANT_ID | TENANT_NAME | BACKUP_TENANT_ID | BACKUP_TENANT_NAME | BACKUP_CLUSTER_ID | BACKUP_CLUSTER_NAME | WHITE_LIST | STATUS | START_TIME | COMPLETION_TIME | PARTITION_COUNT | MACRO_BLOCK_COUNT | FINISH_PARTITION_COUNT | FINISH_MACRO_BLOCK_COUNT | RESTORE_START_TIMESTAMP | RESTORE_FINISH_TIMESTAMP | RESTORE_CURRENT_TIMESTAMP | BACKUP_SET_LIST | BACKUP_PIECE_LIST | INFO | +--------+-----------------+-----------+-----------------------+------------------+----------------------+-------------------+---------------------+------------+----------------------+----------------------------+-----------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ | 1 | -1 | 1001 | restore_oracle_tenant | 1001 | backup_oracle_tenant | 1 | cluster123 | | RESTORE_USER_REPLICA | 2021-12-15 20:32:47.085544 | NULL | 19 | -1 | 0 | -1 | 2021-12-15 20:30:40.877283 | 2021-12-15 20:31:23.140742 | NULL | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/data/backup_set_1_full_20211215 | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/clog/1 | | +--------+-----------------+-----------+-----------------------+------------------+----------------------+-------------------+---------------------+------------+----------------------+----------------------------+-----------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ 1 row in setView the restore history.
Example:
obclient> SELECT * FROM oceanbase.CDB_OB_RESTORE_HISTORY; +--------+-----------------+-----------+---------------------------+------------------+----------------------+-------------------+---------------------+------------+-----------------+----------------------------+----------------------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ | JOB_ID | EXTERNAL_JOB_ID | TENANT_ID | TENANT_NAME | BACKUP_TENANT_ID | BACKUP_TENANT_NAME | BACKUP_CLUSTER_ID | BACKUP_CLUSTER_NAME | WHITE_LIST | STATUS | START_TIME | COMPLETION_TIME | PARTITION_COUNT | MACRO_BLOCK_COUNT | FINISH_PARTITION_COUNT | FINISH_MACRO_BLOCK_COUNT | RESTORE_START_TIMESTAMP | RESTORE_FINISH_TIMESTAMP | RESTORE_CURRENT_TIMESTAMP | BACKUP_SET_LIST | BACKUP_PIECE_LIST | INFO | +--------+-----------------+-----------+---------------------------+------------------+----------------------+-------------------+---------------------+------------+-----------------+----------------------------+----------------------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ | 1 | -1 | 1001 | restore_oracle_tenant_new | 1001 | backup_oracle_tenant | 1 | cluster123 | | RESTORE_SUCCESS | 2021-12-15 19:25:01.271951 | 2021-12-15 19:26:34.966226 | 114 | -1 | 114 | -1 | 2021-12-15 19:21:45.577556 | 2021-12-15 19:21:45.577556 | NULL | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/data/backup_set_1_full_20211215 | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/clog/1 | | | 2 | -1 | 1002 | restore_oracle_tenant | 1001 | backup_oracle_tenant | 1 | cluster123 | | RESTORE_SUCCESS | 2021-12-15 19:27:27.730347 | 2021-12-15 19:29:20.666024 | 126 | -1 | 126 | -1 | 2021-12-15 19:21:45.577556 | 2021-12-15 19:23:10.491747 | NULL | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/data/backup_set_1_full_20211215 | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1001/clog/1 | | | 3 | -1 | 1003 | restore_mysql_tenant | 1002 | backup_mysql_tenant | 1 | cluster123 | | RESTORE_SUCCESS | 2021-12-15 19:29:22.235016 | 2021-12-15 19:31:28.607833 | 7 | -1 | 7 | -1 | 2021-12-15 19:21:45.577556 | 2021-12-15 19:23:10.491747 | NULL | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1002/data/backup_set_1_full_20211215 | file:///data/nfs/backup/ob1.obc.obc/1/incarnation_1/1002/clog/1 | | +--------+-----------------+-----------+---------------------------+------------------+----------------------+-------------------+---------------------+------------+-----------------+----------------------------+----------------------------+-----------------+-------------------+------------------------+--------------------------+----------------------------+----------------------------+---------------------------+---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+------+ 3 rows in set
View the restore progress and results in OCP
To view the restore progress and results in OCP, perform the following steps:
Log on to the OCP console.
In the left-side navigation pane, choose Backup and Recovery > Recovery.
On the Recovery Tasks tab, view the progress and results of the target restore task.
The information about the restore task is displayed in the following columns: ID, Back up Cluster, Back up Tenant, Backup Method, Destination Cluster, Destination Tenant, Recovered At, Started At, Ended At, and Status.
If the restore task fails, you can click View Cause in the Actions column to view the cause of the failure.
In the upper-right corner of the tab, you can select Last 24 Hours, Last 7 Days, or Last 30 Days, or select Custom Time and specify a time range to filter restore tasks.