Using Redis-Shake to Import an RDB or AOF File to a GeminiDB Redis Instance
Importing an RDB File to a GeminiDB Redis Instance
- Deploy the required migration tool.
- Obtain Redis-Shake.
Download the Redis-Shake release package and decompress it.
- Modify the Redis-Shake.conf configuration file and configuring the following items:
log.level = info #Default log level. A printed INFO log contains migration progress information, based on which you can judge whether the migration is complete.
source.rdb.input = /xx/xx.rdb # Absolute path of the source RDB file
target.address = <host>:6379 # Destination instance IP address
target.password_raw = ***** # Password for logging in to a destination instance
target.version = 5.0 # Version of the destination Redis instance
target.type = standalone # Destination instance type
target.db = -1 # Specific database on the destination that all data will be migrated to. If this parameter is set to -1, a mapping relationship is established between migrated databases and databases in the source instance.
target.dbmap = #Configure the database migration mapping. The value of target.db must be -1, for example, 0-5. 1-3 indicates that data in source database db0 will be written to destination database db5 and data in source database db1 will be written to destination database db3.
big_key_threshold = 52428800 # Big key threshold. If the number of value bytes corresponding to a key exceeds the threshold, data is written in batches.
resume_from_break_point = false #Disable resumable download. This function is unavailable.
- Specify whether data of the destination is overwritten.
If there are duplicate keys on the source and destination, specify whether data of the destination is overwritten. The options are as follows:
- rewrite indicates that the source overwrites the destination.
- none indicates that the migration process exists once duplicate keys are detected.
- ignore indicates that keys in the source are retained and keys in the destination are ignored. This value does not take effect in rump mode.
none is recommended. There will be no duplicate data because the source is an RDB file. If the migration exits unexpectedly, you can choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact the customer service.
- Obtain Redis-Shake.
- Migrate data.
Run the following command to start migration:
./redis-shake.linux -conf=redis-shake.conf -type=restore
Use the restore mode because the source is an RDB file.
Stop the migration process after the migration is complete.
- Verify data.
Data is obtained from the RDB file. Therefore, you need to check the GeminiDB Redis data at the destination end from the service perspective.
Importing an AOF File to a GeminiDB Redis Instance
- Upload the generated AOF file to an ECS.
- Start the open-source Redis 5.0 single-node process on the ECS to load the AOF file and wait till the process is started. Ensure that the startup directory of the open-source Redis is the same as the directory containing the AOF file.
- Run the SAVE command to generate an RDB file. Place the RDB file in the startup directory of the open-source Redis.
- Stop the open-source Redis 5.0 process.
- Perform the migration by following Importing an RDB File to a GeminiDB Redis Instance.
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