# Indexes (and thus data) gone after ES upgrade

**URL:** <https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531>\
**Category:** Elasticsearch\
**Created:** [June 12, 2016, 7:43am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531 "2016-06-12T07:43:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 12, 2016, 7:43am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/1 "2016-06-12T07:43:27Z")

</div>

Hi all,

I've updated my systems through sudo apt-get upgrade / update and my elasticsearch got updated with it as well.  
However after updating the necessary plug-ins I saw my data was gone as well. Is this expected?  
Should I always back-up my data before upgrading/updating? I'm talking about a small update here, it went from 2.3.2 to 2.3.3 ... Any best practises on this part?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 12, 2016, 8:31am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/2 "2016-06-12T08:31:13Z")

</div>

Not expected at all.

May be the config dir or data dir changed?

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 12, 2016, 8:51am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/3 "2016-06-12T08:51:47Z")

</div>

Hi @dadoonet,

thanks for the reply.

I'm not sure what happened, I installed it (iirc) through apt-get, all of my directories are where they are expected to be (/usr/share/... config in /etc/elasticsearch). After the update however I got the message that my config was wrong, es.default.config was no longer used. However in my config file, that line was nowhere to be found. ([https://github.com/elastic/elasticsearch/issues/14347](https://github.com/elastic/elasticsearch/issues/14347)) I had the same issue, but the cause was not that related. So when I fixed that, my data was gone. Now that I'm typing this could it be I have two installations of elasticsearch somehow? How could I find out? Perhaps one got updated and started, while I was working with a different binary all along?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 16, 2016, 4:32am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/4 "2016-06-16T04:32:35Z")

</div>

This message about `es.default.config` makes me think that the service script was not updated or is something different than the one we provide.

But I'm not expert on that field so can't really comment.

Your data is probably still living somewhere on the disk but in another dir.  
Using the default `elasticsearch` cluster name (because it did not find the config dir) instead the one you set.

---

<div class="post-metadata">

**Author:** ![Marcin\_Kubica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_kubica/32/5614_2.png) [@Marcin\_Kubica](https://discuss.elastic.co/u/Marcin_Kubica)\
**Post date:** [June 16, 2016, 4:41am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/5 "2016-06-16T04:41:23Z")

</div>

Not related as my case is on Centos, however did same update recently and I can assure you all of 2TB I had there was intact.

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 16, 2016, 7:55am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/6 "2016-06-16T07:55:40Z")

</div>

Thanks guys! The data is then probably still living somewhere 🙂  
It was only a staging server and I had data dumps of the json in there so I' m ok, but was worried when this might happen on a production server.

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 16, 2016, 8:24am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/7 "2016-06-16T08:24:00Z")

</div>

Perhaps a DevOps question, how can I make sure not to update my ES installation when I perform an apt-upgrade or an equivalent in CentOS? My libraries are built on a specific version of the API of ES, just updating it, even in a minor version number might be a potential case for unwanted errors?

---

<div class="post-metadata">

**Author:** ![Marcin\_Kubica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_kubica/32/5614_2.png) [@Marcin\_Kubica](https://discuss.elastic.co/u/Marcin_Kubica)\
**Post date:** [June 16, 2016, 8:41am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/8 "2016-06-16T08:41:39Z")

</div>

To be 100% sure I would simply remove the repo definition. Add back when needed, upgrade, remove again.

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 16, 2016, 10:07am UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/9 "2016-06-16T10:07:01Z")

</div>

That's what I was thinking, however I'm not a DevOps person so it's best to ask and learn. Thanks for replying!

---

<div class="post-metadata">

**Author:** ![Marcin\_Kubica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_kubica/32/5614_2.png) [@Marcin\_Kubica](https://discuss.elastic.co/u/Marcin_Kubica)\
**Post date:** [June 17, 2016, 2:02pm UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/10 "2016-06-17T14:02:48Z")

</div>

Well, you can also try repo manager which can disable repos 😉

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 17, 2016, 2:15pm UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/11 "2016-06-17T14:15:19Z")

</div>

thanks!

---

<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 5, 2017, 10:42pm UTC](https://discuss.elastic.co/t/indexes-and-thus-data-gone-after-es-upgrade/52531/12 "2017-07-05T22:42:44Z")

</div>


