Redis - Promoting a slave to master manually

2019-04-30 11:22发布

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

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).

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

标签: redis
2条回答
Ridiculous、
2楼-- · 2019-04-30 11:42

it depends, if you are in a cluster you will be better using the fail over. You will need to use the force option in the command

http://redis.io/commands/cluster-failover

查看更多
Lonely孤独者°
3楼-- · 2019-04-30 11:52

use SLAVEOF NO ONE to promote a slave to master

http://redis.io/commands/slaveof

查看更多
登录 后发表回答