Before you restore data, you must create resources, set the encryption configuration, and set the restore configuration.
Considerations
Before you restore data, you must confirm the version of the OceanBase database that hosts the backup data to be restored. OceanBase Database supports only the restore of backup data to OceanBase Database of the same or a later version. For example, backup data of OceanBase Database V4.1.0 can be restored only to OceanBase Database V4.1.0 or later.
Backup data in OceanBase Database earlier than V4.1.0 cannot be restored to OceanBase Database V4.1.0. For example, backup data in OceanBase Database V4.0.x cannot be restored to OceanBase Database V4.1.0.
Preparations before the restore
Log on to the
systenant of the cluster as therootuser.Create a resource unit.
For example:
obclient [(none)]> CREATE RESOURCE UNIT box_16c96g MAX_CPU 16, MEMORY_SIZE = '2G', MAX_IOPS 10240, MIN_IOPS=10240;For more information about how to create a resource unit configuration, see Create a resource unit configuration.
Create a resource pool.
For example:
obclient [(none)]> CREATE RESOURCE POOL restore_pool unit = 'box_16c96g', unit_num = 1, zone_list = ('z1','z2','z3');For more information about how to create a resource pool, see Create a resource pool.
Execute the following statement to set the encryption configuration:
Note
If the data to be restored is not encrypted, or Key Management Service (KMS) of the original version is available, skip this step.
obclient [(none)]> SET @kms_encrypt_info = '<encryption string>';Set
<encryption string>to the value ofEXTERNAL_KMS_INFO.EXTERNAL_KMS_INFOis a tenant-specific parameter.Note
external_kms_infois used to store specific key management information.(Optional) Set a restore password.
obclient [(none)]> SET DECRYPTION IDENTIFIED BY 'password';A restore password is required only when a password has been specified during backup. If the passwords for full backup and incremental backup are different, multiple passwords must be entered and separated with commas (,). For example:
obclient [(none)]> SET DECRYPTION IDENTIFIED BY 'password1', 'password2';