redis-operator
redis-operator copied to clipboard
Backup and Restore
Hi, I want to backup from my cluster data in kubernetes. what should i do?
Is there anyway to backup then restore or fork my redis database?
It's in to-do list @arezvani
Are there any thoughts on how to do this @iamabhishek-dubey? We are starting to look at this and I think we are going to run a sidecar to copy the rdb files elsewhere.
@iamabhishek-dubey thank you. Can you please help me now what should i do to have this feature? for backup i think we should use save or bgsave then copy the rdb files to elsewhere but i have many questions:
- We should just take backup from masters? for example if we have 6 nodes with 3 master with 1 slave for each master, we should take backup from just 3 masters? how we should take backup from only masters?
- what about nodes.conf? I think we should also take backup from cluster config in nodes.conf but my problem is k8s pod ip change and it's not stable. we should write a script to set ip?
Here is overview how Redis Enterprise takes consistent backup: https://redis.com/redis-enterprise/technology/backup-disaster-recovery/
another possible solution is to use velero to backup all redis resources with data. mentioned by @arezvani , we can exclude data from slave pods and could use hook to trigger save/bgsave before backup.
Slightly off topic, but I'm running an application that requires Redis v6 - so I am using 0.8 of the Helm Chart, I was wondering, how might I import the dump from a standalone into a freshly made cluster? Put the dumb.rdb file in /data on first boot?
Should we implement using velero