# How to restore index data if I remove all my master nodes accidentally!

**URL:** <https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109>\
**Category:** Elasticsearch\
**Created:** [June 7, 2021, 7:22am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109 "2021-06-07T07:22:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hiren\_Loong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiren_loong/32/89902_2.png) [@Hiren\_Loong](https://discuss.elastic.co/u/Hiren_Loong)\
**Post date:** [June 7, 2021, 7:22am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/1 "2021-06-07T07:22:55Z")

</div>

There are 3 master nodes and 6 data nodes in my ES Cluster. ES version is 6.7.x.  
I delete virtual machines accidentally, so 3 master nodes are disappeared forever!  
But my 6 data nodes are still on.  
Is any possible to restore old data from the data nodes?  
Oh God! PLZ HELP ME!  
BTW: I have no snapshots, no backups @\_@

---

<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:** [June 7, 2021, 7:27am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/2 "2021-06-07T07:27:10Z")

</div>

Which version of Elasticsearch are you using? Do you have a snapshot taken using the Elasticsearch APIs to restore from?

---

<div class="post-metadata">

**Author:** ![Hiren\_Loong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiren_loong/32/89902_2.png) [@Hiren\_Loong](https://discuss.elastic.co/u/Hiren_Loong)\
**Post date:** [June 7, 2021, 7:32am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/3 "2021-06-07T07:32:58Z")

</div>

😫 version is 6.7. I don't have any snapshot.  
And i have already read Elasticsearch Reference, but it does not help.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 7, 2021, 7:47am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/4 "2021-06-07T07:47:11Z")

</div>

Welcome to our community! 😃

You _might_ be able to convert a data node to a master and see if that bootstraps the cluster back. But without backups there's no guarantee.

---

<div class="post-metadata">

**Author:** ![Hiren\_Loong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiren_loong/32/89902_2.png) [@Hiren\_Loong](https://discuss.elastic.co/u/Hiren_Loong)\
**Post date:** [June 7, 2021, 9:39am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/6 "2021-06-07T09:39:47Z")

</div>

> [@warkolm](#):
>
> Welcome to our community! 😃
> 
> You _might_ be able to convert a data node to a master and see if that bootstraps the cluster back. But without backups there's no guarantee.

Thanks for your help!  
I'm trying to solve the matter in other ways.  
Can I just write a application with JAVA Lucene to read the files from ES data nodes:

1. Fields: \*.fnm
2. Field Index: \*.fdx
3. Field Data: \*.fdt

Is it possible to read the Key/Value from these files?  
Or anything else I missed?

---

<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:** [June 7, 2021, 9:45am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/7 "2021-06-07T09:45:00Z")

</div>

Why would you start with such a custom and unsupported approach?

---

<div class="post-metadata">

**Author:** ![Hiren\_Loong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiren_loong/32/89902_2.png) [@Hiren\_Loong](https://discuss.elastic.co/u/Hiren_Loong)\
**Post date:** [June 7, 2021, 10:31am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/8 "2021-06-07T10:31:47Z")

</div>

Because the approach (_convert a data node to a master_) might not work  
If this happens, my final choice is and only is **Reading the files** 💀

---

<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:** [June 7, 2021, 10:50am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/9 "2021-06-07T10:50:05Z")

</div>

I would recommend trying to make the data nodes master eligible first though as it would save you a lot of work if it was successful. I believe Elasticsearch 6.x is more forgiving than 7.x so would not rule out that it could work.

---

<div class="post-metadata">

**Author:** ![Hiren\_Loong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiren_loong/32/89902_2.png) [@Hiren\_Loong](https://discuss.elastic.co/u/Hiren_Loong)\
**Post date:** [June 22, 2021, 3:42am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/10 "2021-06-22T03:42:15Z")

</div>

Thanks a lot!  
_convert a data node to a master_ finally it works 😃

---

<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 20, 2021, 3:43am UTC](https://discuss.elastic.co/t/how-to-restore-index-data-if-i-remove-all-my-master-nodes-accidentally/275109/11 "2021-07-20T03:43:09Z")

</div>

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