Adding redis snapshot to another instance

10 views
Skip to first unread message

nasimdev...@gmail.com

unread,
Jul 23, 2017, 6:28:34 AM7/23/17
to Redis DB
Hi,

I want to add keys in a redis instance (A) to another redis (B) without loosing keys already existing in B.
I'm aware of creating a snapshot on A and restoring it on B but I guess I'll loose keys on B.
Is there any tool to do that? Should I write a code myself?

Tuco

unread,
Jul 24, 2017, 1:41:00 AM7/24/17
to Redis DB
You should use a combination of scan and migrate commands.
Migrate command can be used to migrate the keys from one redis instance to another, and has the option to copy the individual keys.
So you should scan all the keys and execute migrate command on each so that they are copied to the destination redis.
Reply all
Reply to author
Forward
0 new messages