Redis - 手动提升从属为主 [英] Redis - Promoting a slave to master manually

查看:44
本文介绍了Redis - 手动提升从属为主的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有 [Slave IP Address],它是 [Master IP Address] 的从站.

Suppose I have [Slave IP Address] which is the slave of [Master IP Address].

现在我的主服务器已经关闭,我需要手动将这个从服务器设置为主服务器(无需使用哨兵自动故障转移,使用 redis 命令).

Now my master server has been shut down, and I need to set this slave to be master MANUALLY (WITHOUT using sentinel automatic failover, WITH redis command).

是否可以在不重新启动 redis 服务的情况下执行此操作?(并丢失所有缓存数据)

Is it possible doing this without restarting the redis service ? (and losing all the cached data)

推荐答案

使用SLAVEOF NO ONE将一个从属提升为主

use SLAVEOF NO ONE to promote a slave to master

http://redis.io/commands/slaveof

这篇关于Redis - 手动提升从属为主的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆