We have talked about Redis in recent articles. In this part, we are going to talk about how we can take Redis cluster and master-slave backup. Let’s start by reading what is cluster and master-slave configurations in Redis.
You can read about the difference between them here
Now when we talk about backup we have seen many tools like rump. But none of them were able to take a backup of Redis cluster and master-slave and restore them.
Meet Redis Shake
Redis shake is a tool open-sourced by alibaba and I have to say this, it is the best tool that I have come across when it comes to Redis backup and restore back. It is very well written in golang and below is the functionality that it provides.
You can take a backup from redis cluster and master-slave
You can restore to cluster and master-slave
You can also do live sync between two Redis cluster, given Redis supports psync2.
You can take a backup from any number of shards and can restore to any number of shards.
You can take a backup from managed Redis provider as they use Redis protocol only like elasticache, azure Redis, etc.
I am not going to write about how you can use it and the config. You can read it on their repository as they have very good documentation. It is very easy to use this tool you can follow this repository to take backup and restore. Alibaba has other tools also with the name *-shake for backup like mongo-shake.
You can check out their other repos in their Github home.
If you like the article please share and subscribe