当前位置:网站首页>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#
边栏推荐
猜你喜欢

Esp32-solo development tutorial to solve config_ FREERTOS_ UNICORE problem

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

如何把老式键盘转换成USB键盘并且自己编程?
![Count the logarithm of points that cannot reach each other in an undirected graph [classic adjacency table building +dfs Statistics - > query set optimization] [query set manual / write details]](/img/cc/a0be58eddc72c22a9a6ee5c61eb81a.png)
Count the logarithm of points that cannot reach each other in an undirected graph [classic adjacency table building +dfs Statistics - > query set optimization] [query set manual / write details]

Central Limit Theorem

Generate flow chart with code, and how to use markdown

3-wire SPI screen driving mode

Law of Large Numbers

2022年地理信息系统与遥感专业就业前景与升学高校排名选择

Lwip之ARP模块实现
随机推荐
Find the minimum value in the rotation sort array ii[classical Abstract dichotomy + how to break the game left, middle and right are equal]
Gaussian and Summary Stats
LeetCode 142. 环形链表 II
Employment prospect of GIS and remote sensing specialty and ranking selection of universities in 2022
基于SSMP的宠物医院管理系统
Review the old and know the new -- constant renewal at normal temperature
What is the difference between the working principle of gas-liquid slip ring and other slip rings
The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
memcached基础6
memcached基础3
目前哪个证券公司炒股开户是最好最安全的?
解决unable to create a folder to save the sketch: mkdir sketch
Central Limit Theorem
Keepalived 实现 Redis AutoFailover (RedisHA)11
07 | 工作流设计:如何设计合理的多人开发模式?
XSS攻击笔记(上)
Esp32-solo development tutorial to solve config_ FREERTOS_ UNICORE problem
flutter系列之:flutter中的flow
Is it safe for CITIC Securities Commission to open an online account and speculate in stocks
Unable to create a folder to save the sketch: MKDIR sketch