How it works...
In this recipe, we first introduced three methods to do data migration from one instance to another instance.
The first two methods are master-slave synchronization/loading persistence data files. Both methods are quite self explanatory.
The third one is the command MIGRATE. As stated in the Redis command documentation, this command actually executes a DUMP in the source instance, and a RESTORE in the target instance. There are two options, COPY and REPLACE, for one to decide the behavior of this command. If the COPY option is specified, the data from the source instance won't be deleted after the migration. Moreover, with the REPLACE option, you can overwrite the existing key of the target instance during migration.
We then ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access