# Recover data after the lost of master \[7.1.1\]

**URL:** https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775
**Category:** Elasticsearch
**Created:** [June 27, 2019, 7:58am UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775 "2019-06-27T07:58:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![syavel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syavel/32/45939_2.png) [@syavel](https://discuss.elastic.co/u/syavel)
#### Post date: [June 27, 2019, 7:58am UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/1 "2019-06-27T07:58:05Z")

</div>

Hi,

I have a cluster with 3 masters node and 3 data node.  
I've lost my 3 masters at the same time, is there a way to recover the data ?  
I've tried to promote my 3 data node to the master but I have this log:

`master not discovered or elected yet, an election requires at least 2 nodes with ids from [LaOUswy8TgG4GCWhtGO0Eg, kYSxOZ2dQjOFjvxAkj2s9g, iSw9oU5XS5eCtPjT6NJaSQ], have discovered [{es-data2-1}{CtvxakqiQ42yQjgyiFA0Kg}{MynpI1rsSmCeUJs36aZlAw}{100.96.22.25}{100.96.22.25:9300}{ml.machine_memory=16636354560, ml.max_open_jobs=20, xpack.installed=true}, {es-data2-2}{SHqLeNMITnizAIG5sFFGHQ}{mGjI5RJRQV-j6NuQ353YZg}{100.96.11.243}{100.96.11.243:9300}{ml.machine_memory=16636346368, ml.max_open_jobs=20, xpack.installed=true}] which is not a quorum; discovery will continue using [100.96.11.243:9300, 100.96.22.25:9300] from hosts providers and [{es-data2-0}{zxg1_3GvQtmgVwB4PmLRvg}{smM8qzBdSz6XVDZYZVfCJw}{100.96.5.242}{100.96.5.242:9300}{ml.machine_memory=16636354560, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 5, last-accepted version 1142 in term 5" }`

---

<div class="post-metadata">

### Author: ![sunil9dbit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunil9dbit/32/48619_2.png) [@sunil9dbit](https://discuss.elastic.co/u/sunil9dbit)
#### Post date: [June 27, 2019, 9:06am UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/2 "2019-06-27T09:06:42Z")

</div>

Configure 2 Nodes with Master.Allow them to communicate.So that it wont result in split brain issue.But you will have duplicate records in indexes.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [June 27, 2019, 11:21am UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/3 "2019-06-27T11:21:13Z")

</div>

Unfortunately the master nodes hold important information about the cluster that can't be rebuilt from elsewhere. The best thing to do is recover the master nodes - as long as at least two of the masters' data folders are intact you should be able to start nodes on these data folders and reinstate the cluster. If you can't recover the master nodes, your best bet is to build a new cluster and restore the data from a recent snapshot.

---

<div class="post-metadata">

### Author: ![syavel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syavel/32/45939_2.png) [@syavel](https://discuss.elastic.co/u/syavel)
#### Post date: [June 27, 2019, 11:35am UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/4 "2019-06-27T11:35:30Z")

</div>

Thanks for your response.

My master's data folders are definitevely lost. And I have no snapshot. (I haven't realised that the data folder of master was so important and thanks docker & k8s for the reset of pod) So there is no way (even a hard way) to rebuild my index juste with the data folder of my data node ?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [June 27, 2019, 11:42am UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/5 "2019-06-27T11:42:37Z")

</div>

After losing the masters there's no guarantees that your data will come back intact, but you can try the [`elasticsearch-node` tool](https://www.elastic.co/guide/en/elasticsearch/reference/current/node-tool.html), particularly [`elasticsearch-node detach-cluster`](https://www.elastic.co/guide/en/elasticsearch/reference/current/node-tool.html#node-tool-detach-cluster). Please read the instructions carefully and understand the risks before proceeding.

For future reference, it's vitally important to use persistent volumes for the master-eligible nodes in the cluster, as well as for the data nodes.

---

<div class="post-metadata">

### Author: ![syavel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syavel/32/45939_2.png) [@syavel](https://discuss.elastic.co/u/syavel)
#### Post date: [June 27, 2019, 12:57pm UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/6 "2019-06-27T12:57:36Z")

</div>

Thanks very much !  
Now, I can see my shards and indices. I'm checking data but it seem ok.  
I've created a new cluster with a persistent volume for masters nodes. And I've installed the s3 plugin for snapshot.

Thanks again for your help.

---

<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: [July 25, 2019, 12:57pm UTC](https://discuss.elastic.co/t/recover-data-after-the-lost-of-master-7-1-1/187775/7 "2019-07-25T12:57:40Z")

</div>

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