网上查了很多文章说要删除 dump.rdb nodes.conf 如果有aof文件也要删除然后再通过 redis-trib.rb 命令重新建一次集群,这种方法历史数据全部丢了,不推荐。
我试了下先把redis cluster 的节点 7001 7002 7003 7004 7005 7006 停掉。然后把7001 7002 7003 7004 7005 7006 目录下的nodes.conf文件的ip全部改成新ip ,然后重启这些节点。集群就恢复了。
e950a5128683823182f6ca3ecc9e6af0e69c734f 15.99.72.167:7004@17004 master - 0 1584077612000 26 connected 10923-16383
b67f6346155ba9c4c983d4ac6bd0cdfc7db406cb 15.99.72.167:7006@17006 slave 6f9bb43fa9662457c6cf8c8aeaf9e43c320eba11 0 1584077614221 28 connected
c5103c9032a2c2d33c200dd68cd3cd89e65e133b 15.99.72.167:7005@17005 slave ab9e3bdb10f80938201ec668e34b2a501a29887f 0 1584077613218 25 connected
ab9e3bdb10f80938201ec668e34b2a501a29887f 15.99.72.167:7001@17001 myself,master - 0 1584077611000 25 connected 0-5460
aeaacf33723c20d91fc3aa1668f71f4855d994c8 15.99.72.167:7003@17003 slave e950a5128683823182f6ca3ecc9e6af0e69c734f 0 1584077611952 26 connected
6f9bb43fa9662457c6cf8c8aeaf9e43c320eba11 15.99.72.167:7002@17002 master - 0 1584077614000 28 connected 5461-10922
vars currentEpoch 28 lastVoteEpoch 28