How to start cluster with data in node?

1,740 views
Skip to first unread message

Alex Black

unread,
Apr 15, 2015, 1:41:40 AM4/15/15
to redi...@googlegroups.com
Hi every body,

I have created a cluster with 6 nodes, 3 masters and 3 clusters and stored some data in it. Because of power failure, my cluster was shutdown. I have recreate my cluster and after run the command redis-trib.rb i meet an error  "Node 127.0.0.1:30000 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.". I do not want to delete all values in my database, so how can i restart my cluster with data in each node?

Alex Black

unread,
Apr 15, 2015, 9:47:53 PM4/15/15
to redi...@googlegroups.com
I have solved this problem. We turn on the died node and evething ok. Do not need to run redis-trib.rb again. Thank for watching.

z...@cn.tradeshift.com

unread,
Oct 7, 2016, 11:14:08 PM10/7/16
to Redis DB
are you sure ? I can write , but only in master self ,others are error.

George Chilumbu

unread,
Oct 18, 2016, 5:38:18 AM10/18/16
to Redis DB
Before any node can join the cluster, it must be empty. But a node is an old node like in your case, the node should automatically join the cluster as soon as it is started. Initially, it will present itself as a master, but eventually after getting a full sync with the master and also loading all data in memory, it will join back as a slave.

If you want a node to join as a slave right away, i would suggest you delete all the dump.db files and the aof file. So when you restart the redis instance, it will automatically join as a slave right away, but will need time to sync with the master and also load data into memory afterwards. Depending on your size of data, this can take some time to complete.


On Wednesday, April 15, 2015 at 1:41:40 PM UTC+8, Alex Black wrote:
Reply all
Reply to author
Forward
0 new messages