Search code examples
databaseredisredis-server

How to load redis rdb data into running redis server without losing redis data?


I have 2 redis server. If I have backup of one redis server (example.rdb), then how to load this data to another running redis server without losing current memory data ?


Solution

  • You can use the rdb command from redis-rdb-tools with the -c protocol option to output redis commands representing the data in the RDB file, and pipe them into a redis instance using netcat, socat, or similar.

    Unfortunately, this python package was built for now unsupported python 2.7 and 3.5 and has not been updated since 2020 (see FAQs).