redis-ha
redis-ha copied to clipboard
guidance
Sir do you know how to backup and restore this stuff? Also any performance related parameters which requires tweaking.
Please see this as sample backup procedure :
https://github.com/openlab-red/redis-ha/blob/master/management/backup/README.md
About performance you can refer to the redis official document.
Thank you sir again for your timely help :-) Trying to script into shell so that I can run automate it.
oc debug dc/backend-redis (this runs fine)
export REDIS_MASTER_IP=$(redis-cli -h backend-redis-sentinel -p 26379 --csv SENTINEL get-master-addr-by-name mymaster |awk -F, '{print $1}'|sed -e 's/^"//' -e 's/"$//') ----This one doesn't get triggered inside the debug console echo $REDIS_MASTER_IP
export REDIS_BACKUP_STATUS=$(redis-cli -h $REDIS_MASTER_IP -p 6379 bgsave) ----This one doesn't get triggered inside the debug console echo $REDIS_BACKUP_STATUS date -d @$(redis-cli -h $REDIS_MASTER_IP -p 6379 lastsave | cut -d ' ' -f1) ----This one doesn't get triggered inside the debug console
export REDIS_MASTER=$(oc get pods -lapp=backend-redis -o custom-columns=NAME:.metadata.name,IP:.status.podIP --no-headers | grep $REDIS_MASTER_IP| cut -d ' ' -f1) **----This one $REDIS_MASTER_IP from debug console need to get passed out for this to run ** oc rsync $REDIS_MASTER:/var/lib/redis/data/appendonly.aof /tmp/ oc rsync $REDIS_MASTER:/var/lib/redis/data/dump.rdb /tmp/
I can suggest to run all single command one by one from the following assignment and discover the error:
export REDIS_MASTER_IP=$(redis-cli -h backend-redis-sentinel -p 26379 --csv SENTINEL get-master-addr-by-name mymaster |awk -F, '{print $1}'|sed -e 's/^"//' -e 's/"$//')
- redis-cli -h backend-redis-sentinel -p 26379 --csv SENTINEL get-master-addr-by-name mymaster
- redis-cli -h backend-redis-sentinel -p 26379 --csv SENTINEL get-master-addr-by-name mymaster |awk -F, '{print $1}'
- redis-cli -h backend-redis-sentinel -p 26379 --csv SENTINEL get-master-addr-by-name mymaster |awk -F, '{print $1}'|sed -e 's/^"//' -e 's/"$//'