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 V3.2.4 can be restored only to OceanBase Database V3.2.4 or later.
In addition, if you use OceanBase Database V3.2.4, you can restore the backup data of OceanBase Database V2.2.7x, V3.1.2 BP2 (20210813154332), or later.
Procedure
Log on to the
systenant as therootuser.Create a resource unit.
Example:
obclient> CREATE RESOURCE UNIT box_16c96g max_cpu 16, max_memory 103079215104, max_iops 10240, max_disk_size 53687091200, max_session_num 64, MIN_CPU=16, MIN_MEMORY=103079215104, MIN_IOPS=10240;Create a resource pool.
Example:
obclient> CREATE RESOURCE POOL restore_pool unit = 'box_16c96g', unit_num = 1, zone_list = ('z1','z2','z3');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> SET @kms_encrypt_info = '<encryption string>';Set
<encryption string>to the value ofEXTERNAL_KMS_INFO. Here,EXTERNAL_KMS_INFOis a tenant-specific parameter.Note
external_kms_infois used to store specific key management information. For more information about this parameter, see external_kms_info.Complete the restore configuration.
Check whether the value of
restore_concurrencyis0.0indicates that restore concurrency is disabled. You can set this parameter as needed. If the value is0, execute the following statement:obclient> ALTER SYSTEM SET restore_concurrency = 10;Optional. Modify the duration of the restore idle period.
The default value of
_restore_idle_timeis 1 minute. The restore procedure contains three idle periods, which are 3 minutes in total. To reduce the amount of waiting time during restore performance testing, you can execute the following statement to shorten the duration to10s:obclient> ALTER SYSTEM SET _restore_idle_time = '10s';Optional. Set a restore password.
obclient> 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 (,). Example:
obclient> SET DECRYPTION IDENTIFIED BY 'password1','password2';