# ElasticSearch clone the cluster from existing

**URL:** https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791
**Category:** Elasticsearch
**Created:** [July 27, 2020, 5:51pm UTC](https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791 "2020-07-27T17:51:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bhuvaneshdct](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhuvaneshdct/32/70081_2.png) [@bhuvaneshdct](https://discuss.elastic.co/u/bhuvaneshdct)
#### Post date: [July 27, 2020, 5:51pm UTC](https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791/1 "2020-07-27T17:51:35Z")

</div>

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.

```auto
discovery.seed_hosts
cluster.initial_master_nodes
network.host
node.name

```

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

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

```

Not sure how to solve this.

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [July 27, 2020, 6:01pm UTC](https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791/2 "2020-07-27T18:01:25Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![bhuvaneshdct](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhuvaneshdct/32/70081_2.png) [@bhuvaneshdct](https://discuss.elastic.co/u/bhuvaneshdct)
#### Post date: [July 27, 2020, 6:06pm UTC](https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791/3 "2020-07-27T18:06:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [July 27, 2020, 6:08pm UTC](https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791/4 "2020-07-27T18:08:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 24, 2020, 6:08pm UTC](https://discuss.elastic.co/t/elasticsearch-clone-the-cluster-from-existing/242791/5 "2020-08-24T18:08:24Z")

</div>

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