当前位置:网站首页>Kept to implement redis autofailover (redisha) 12
Kept to implement redis autofailover (redisha) 12
2022-06-27 01:01:00 【franket】
redis_stop.sh
stop State switch script , The difference is that they refer to each other as master
[email protected] scripts# cat /etc/keepalived/scripts/redis_stop.sh
#!/bin/bash
REDISCLI="/usr/local/bin/redis-cli"
LOGFILE="/data/redis/keepalived-redis-state.log"
pid=$$
echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop being slave status" >> $LOGFILE
#echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop ready to sync with master" >> $LOGFILE
#echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop Run 'SLAVEOF redis-b 6379'" >> $LOGFILE
#$REDISCLI SLAVEOF redis-b 6379 >> $LOGFILE 2>&1
#echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop wait other connect...." >> $LOGFILE
[email protected] scripts#
[email protected] scripts# cat /etc/keepalived/scripts/redis_stop.sh
#!/bin/bash
REDISCLI="/usr/local/bin/redis-cli"
LOGFILE="/data/redis/keepalived-redis-state.log"
pid=$$
echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop being slave status" >> $LOGFILE
#echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop ready to sync with master" >> $LOGFILE
#echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop Run 'SLAVEOF redis-a 6379'" >> $LOGFILE
#$REDISCLI SLAVEOF redis-a 6379 >> $LOGFILE 2>&1
#echo "date +'%Y-%m-%d:%H:%M:%S'|$pid|state:stop wait other connect...." >> $LOGFILE
[email protected] scripts#
边栏推荐
- 07 | 工作流设计:如何设计合理的多人开发模式?
- 2022年地理信息系统与遥感专业就业前景与升学高校排名选择
- Flink 实战问题(七):No Watermark(Watermarks are only available EventTime is used)
- One click acceleration of Sony camera SD card file copy operation, file operation batch processing tutorial
- About Random Numbers
- 解决u8glib只显示一行文字或者不显示的问题
- CEC-I 中华学习机使用说明与问答
- idea 热启动失效解决方案
- 用代码生成流程图,Markdown的使用方法
- JSON parsing, esp32 easy access to time, temperature and weather
猜你喜欢

Live review | Ziya &ccf TF: Discussion on software supply chain risk management technology under cloud native scenario

07 | workflow design: how to design a reasonable multi person development mode?

疫情期间居家办公的总结体会 |社区征文

buuctf-pwn write-ups (6)

Law of Large Numbers

可视化介绍 Matplotlib 和 Plotnine

根据文件名批量生成文件夹

Generate flow chart with code, and how to use markdown

史上最难618,TCL夺得电视行业京东和天猫份额双第一

05 | standard design (Part 2): how to standardize the different styles of commit information, which are difficult to read?
随机推荐
接口测试框架实战(一) | Requests 与接口请求构造
Hid device descriptor and keyboard key value corresponding coding table in USB protocol
Lwip之ARP模块实现
05 | 规范设计(下):commit 信息风格迥异、难以阅读,如何规范?
Generate flow chart with code, and how to use markdown
Beyond lithium battery -- the concept of battery in the future
How to measure the thickness of glass substrate by spectral confocal
memcached基础4
05 | standard design (Part 2): how to standardize the different styles of commit information, which are difficult to read?
Basic introduction to C program structure Preview
Unable to create a folder to save the sketch: MKDIR sketch
Central Limit Theorem
07 | 工作流设计:如何设计合理的多人开发模式?
Keepalived 实现 Redis AutoFailover (RedisHA)11
Law of Large Numbers
JSON parsing, esp32 easy access to time, temperature and weather
find_ Detailed use guide of CIRC
目前哪个证券公司炒股开户是最好最安全的?
CEC-I 中华学习机使用说明与问答
一键加速索尼相机SD卡文件的复制操作,文件操作批处理教程