Restoring RDB Files to GeminiDB Redis API (Recommended)
Scenarios
Redis data of other vendors or self-hosted Redis can be migrated to GeminiDB Redis API.
You need to download the source Redis data, then upload the data to an OBS bucket in the same region as the GeminiDB Redis instance, and create a data import task on the GeminiDB console to import the data to the GeminiDB Redis instance.
Precautions
- Importing data will overwrite data of the current database.
- Importing backups generated by a later-version Redis instance to an earlier one may fail.
- Before importing backups, ensure that resource-intensive commands (such as FLUSHALL, KEYS, and HGETALL) have been disabled on the target Redis instance.
- If a backup contains multi-DB data, its database count cannot exceed what is supported by the target Redis instance.
- Only .rdb files can be imported.
Creating an OBS Bucket and Uploading Backups
If the backup to be uploaded is larger than 5 GB, follow the instructions provided by OBS.
Perform the following steps if the backup is smaller than 5 GB:
- Create an OBS bucket.
When creating an OBS bucket, configure the following parameters as requested. For details, see Creating a Bucket in OBS User Guide.
- Region:
The OBS bucket must be in the same region as the destination Redis instance.
- Storage Class: Available options are Standard, Infrequent Access, and Archive.
Do not select Archive. Otherwise, the backup may fail to be imported.
- Click Create Now.
- Region:
- In the bucket list, click the bucket created in 1.
- In the navigation pane, choose Objects.
- On the Objects tab page, click Upload Object.
- Specify Storage Class.
Do not select Archive. Otherwise, the backup may fail to be imported.
- Upload the objects.
Drag files or folders to the Upload Object area or click add file.
A maximum of 100 files can be uploaded at a time. The total size cannot exceed 5 GB.
Figure 1 Uploading objects in batches
- (Optional) Select KMS encryption to encrypt the uploaded files.
- Click Upload.
Importing Backups
- Log in to the GeminiDB console.
- In the service list, choose Databases > GeminiDB Redis API.
- On the Instances page, locate the target instance and choose More > Import Data in the Operation column.
Figure 2 Importing data
- On the Data Import page, specify OBS Bucket to which a backup have been uploaded.
- Click Add Backup and select the backups to be imported.
Figure 3 Adding backups
- A maximum of 128 backups can be added at a time.
- To delete a backup, locate the target backup and click Delete in the Operation column.
- To delete all backups, select Clear for Backup.
- Click Create Now.
- Confirm the data import and click OK.
Importing data will overwrite data of the current database.
Figure 4 Confirming to import data
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot