ElasticSearch clone the cluster from existing

I have 2 nodes ES cluster(on GCP platform), I want to clone this and need to create a new cluster.

I have taken the image of the current Node1 and 2 then create the VMs.

Then modified these settings as per the new cluster on the elasticsearch.yml file.


Then started the Elasticsearch service. Node 2 is started(but in red), and Node 1 started but giving this error.

[]  no known master node, scheduling a retry
[] master not discovered or elected yet, an election requires a node with id [b6ayR48yTHq6cBvdugYWKA], have discovered [{}{XdhyvbwLQQWBiawK4BX0Ag}{rcJ4blk5Tz2PZuEiViirNg}{}{}{dim}] which is not a quorum; discovery will continue using [] from hosts providers and [{}{XdhyvbwLQQWBiawK4BX0Ag}{rcJ4blk5Tz2PZuEiViirNg}{}{}{dim}] from last-known cluster state; node term 31, last-accepted version 15139 in term 31

Not sure how to solve this.

when you clone you mean copy everything including data dir of elastic?

I believe when you did that uuid is wrong. because hostname/ip etc.. are different.

best thing you could do to clone is startup new cluster (new name/ip etc..) and then copy all index (snapshot/restore)

1 Like

Yes I copied everything. I don't how Node 2 was running fine.

That is not a supported way to set up a cluster. You should set up a brand new cluster and import data via snapshot and restore.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.