当前位置:网站首页>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#
边栏推荐
- Bootstrapblazor + FreeSQL actual combat chart usage (2)
- 网上开通证券账户安全吗 手机炒股靠谱吗
- From bitmap to bloom filter, C # implementation
- Solve the problem that only one line of text is displayed or not displayed in u8glib
- Law of Large Numbers
- 05 | 规范设计(下):commit 信息风格迥异、难以阅读,如何规范?
- Network in network (dolls)
- CH423要如何使用,便宜的国产IO扩展芯片
- leetcode 1143. Longest Commom Subsequence 最长公共子序列(中等)
- CPU的异常处理
猜你喜欢

Law of Large Numbers

Basic introduction to C program structure Preview

超越锂电池——未来电池的概念

Gaussian and Summary Stats

ESP32-添加多目录的自定义组件

3-wire SPI screen driving mode

Flink practical problems (VII): no watermark (watermarks are only available eventtime is used)

XSS攻击笔记(上)

What is the difference between the working principle of gas-liquid slip ring and other slip rings

建模规范:环境设置
随机推荐
CPU exception handling
Simple and fast digital network (network dolls in the network)
Interface test framework practice (I) | requests and interface request construction
Encapsulation of unified result set
How to convert an old keyboard into a USB keyboard and program it yourself?
memcached基础
Xiaobai looks at MySQL -- installing MySQL in Windows Environment
leetcode 1143. Longest common subsequence (medium)
Batch generate folders based on file names
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
接口测试框架实战(一) | Requests 与接口请求构造
CH423要如何使用,便宜的国产IO扩展芯片
2022 Health Expo, Shandong health care exhibition, postpartum health and sleep health exhibition
3線spi屏幕驅動方式
小白看MySQL--windows环境安装MySQL
memcached基础7
Statistical Hypothesis Testing
Summary of working at home during the epidemic | community essay solicitation
07 | workflow design: how to design a reasonable multi person development mode?
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]