Recently, I have a issue can’t move data include: key and value from this server redis to server redis other. How way do it?
Please help me. Best regards
Recently, I have a issue can’t move data include: key and value from this server redis to server redis other. How way do it?
Please help me. Best regards
2
Answers
If you have access to the Redis servers you can use a combination of the commands available here: –
https://redis.io/commands/keys
https://redis.io/commands/dump
https://redis.io/commands/restore
https://redis.io/commands/migrate
I tend to keep track of the keys I have set so I can flush REDIS if I need to.
Someone else with a deeper knowledge may have a better way, but I would either: –
List the keys you need to migrate
Dump them all
Move over the dumped data
Restore them all on the new server
OR
Use the MIGRATE command like this (quoted from the REDIS.IO site)
If you don’t have access to the server and want to do a live migration you can use RIOT. There is more information in the Redis->Redis Cookbook and documentation