After a physical restore job is completed, you can view the restore results in views.
Procedure
Log on to the
systenant of the cluster as therootuser.After a restore job is completed, execute the following statement to view the restore result:
obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_RESTORE_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1 JOB_ID: 1 RESTORE_TENANT_NAME: mysql RESTORE_TENANT_ID: 1002 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_SCN: 1658389117092435000 RESTORE_SCN_DISPLAY: 2022-06-1 07:38:37.092435 RESTORE_OPTION: pool_list=small_pool_2&primary_zone=z1 START_TIMESTAMP: 2022-06-1 15:40:58.366601 FINISH_TIMESTAMP: 2022-06-1 15:44:16.061358 STATUS: SUCCESS BACKUP_PIECE_LIST: file:///data/nfs/backup/archive/piece_d1001r1p1,file:///data/nfs/backup/archive/piece_d1001r2p2 BACKUP_SET_LIST: file:///data/nfs/backup/data/backup_set_1_full BACKUP_CLUSTER_VERSION: 17179869184 LS_COUNT: 3 FINISH_LS_COUNT: 3 TABLET_COUNT: 428 FINISH_TABLET_COUNT: 428 TOTAL_BYTES: 313158553 TOTAL_BYTES_DISPLAY: 298.65MB FINISH_BYTES: 0 FINISH_BYTES_DISPLAY: 0.00MB DESCRIPTION: NULL COMMENT: NULL *************************** 2. row *************************** TENANT_ID: 1002 JOB_ID: 1 RESTORE_TENANT_NAME: mysql RESTORE_TENANT_ID: 1002 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_SCN: 1658389117092435000 RESTORE_SCN_DISPLAY: 2022-06-1 07:38:37.092435 RESTORE_OPTION: pool_list=small_pool_2&primary_zone=z1 START_TIMESTAMP: 2022-06-1 15:40:58.366601 FINISH_TIMESTAMP: 2022-06-1 15:44:05.304540 STATUS: SUCCESS BACKUP_PIECE_LIST: file:///data/nfs/backup/archive/piece_d1001r1p1,file:///data/nfs/backup/archive/piece_d1001r2p2 BACKUP_SET_LIST: file:///data/nfs/backup/data/backup_set_1_full BACKUP_CLUSTER_VERSION: 17179869184 LS_COUNT: 3 FINISH_LS_COUNT: 3 TABLET_COUNT: 428 FINISH_TABLET_COUNT: 428 TOTAL_BYTES: 313158553 TOTAL_BYTES_DISPLAY: 298.65MB FINISH_BYTES: 0 FINISH_BYTES_DISPLAY: 0.00MB DESCRIPTION: NULL COMMENT: NULL 1 row in setThe columns in the
CDB_OB_RESTORE_HISTORYview correspond to those in theCDB_OB_RESTORE_PROGRESSview. TheCOMMENTcolumn records the error information of a failed job.If the restore failed, you can cancel the restore by deleting the tenant. For more information, see Cancel restore.
What to do next
After the physical restore job is completed, the restored tenant is a standby tenant. You can perform the following operations:
Run the
recovercommand to replay logs from the source tenant. For more information, see Replay logs to a standby tenant.Execute the
ACTIVATEstatement to convert the standby tenant into the primary tenant. For more information, see Convert a standby tenant into primary tenant.