I wanted to migrate data from several standalone Redis servers to a single cluster in the cloud.
Redis version of source servers: 2.6
I’ve looked into different approaches:
REPLICAOF
This is not an option since the new target cluster does not allow the use of the REPLICAOF command.
Using a tool that supports client-side replication
Tools like RIOT or Redis-Shake cannot be used since the commands ‘SCAN’, and ‘PSYNC’ have only been available since 2.8
MIGRATE command
I’m thinking of using MIGRATE
command along with KEYS
.
Ideally, I don’t want to delete the source key.
However, the MIGRATE [COPY]
option is only available since 3.0.0
And the MIGRATE [KEYS]
option is only available since 3.0.6
2
Answers
What worked for me:
Here are several options you can choose from: