1

I am searching for a solution to copy a specific db from one redis server to another. The two servers are not located in the same site, or have any sort of connection between them- so the data must be passed via some dump file.

I don't want to use bgsave command and move the dump.rdb file to the target server, as this will transfer ALL redis db's and will overwrite existing data on the target. (I want just a specific db)

what other solutions are available?

2 Answers 2

2

Maybe this process works for you:

  1. Dump to RDB file
  2. Load RDB on a fresh instance
  3. Delete undesired DBs and dump again
  4. Use DEBUG RELOAD NOSAVE NOFLUSH MERGE (not documented command) to load the RDB file from step 3

See here for more info on step 4.

As always, test the process before running in production

0

I guess Redis is not supposed to synchronize between locations, to do the synchronation you are better off putting the crutial data in traditional database like postgresql or MariaDB, who have a builtin function to synchronize and backup data.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.