# Upgrade from 5.6 to 6.5-OSS without loosing data

**URL:** <https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015>\
**Category:** Elasticsearch\
**Created:** [December 1, 2018, 9:06pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015 "2018-12-01T21:06:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 1, 2018, 9:06pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/1 "2018-12-01T21:06:20Z")

</div>

Dear all,

I have a running Cluster on Centos 7 with the RPM of Elasticsearch 5.6.13 installed and running. Now after all pre-flight checks, I want to upgrade to 6.5.

But I do not find a way to upgrade to the OSS Version of Elasticsearch without losing the data. The OSS RPM is not marked as a possible upgrade for the 5.6.13 RPM of elasticsearch. I would need to remove the old RPM but that what would wipe the data directory.

I run a test upgrade with the non-OSS RPM and even that runs into issues (did not save the mess to check on that).

But what is the proposed upgrade way from 5.6 to 6.5 without losing data or do a completely fresh installation - or re-index work. I had read the upgrade notes and it looks like it would be an easy walk if the data is prepared.

Thank you for helping me out of this situation!  
Jan

---

<div class="post-metadata">

**Author:** ![Karatyus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karatyus/32/38307_2.png) [@Karatyus](https://discuss.elastic.co/u/Karatyus)\
**Post date:** [December 1, 2018, 10:44pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/2 "2018-12-01T22:44:10Z")

</div>

Is it not possible tout do a rolled restart?  
Stop node 1  
Upgrage node 1  
Restart node 1  
Stop node 2  
Upgrade node 2  
Restart node 2  
Do this with redistribution of shards OFF.  
I'm just à beginner si perhaps It's a Bad Idea...

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 2, 2018, 10:58am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/3 "2018-12-02T10:58:58Z")

</div>

he @Karatyus

I would love todo that, but shifting the data first off a node and than shift it back to the updated node.

Until the Upgrade to 6.x it was always possible to leave the data on the node and no need was given to shift data between the nodes.

What makes me a little more angry is that no clear communication about that is given in the official docs.

---

<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:** [December 2, 2018, 11:29am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/4 "2018-12-02T11:29:21Z")

</div>

Are you sure that data will be moving if you follow [the instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)?

---

<div class="post-metadata">

**Author:** ![Karatyus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karatyus/32/38307_2.png) [@Karatyus](https://discuss.elastic.co/u/Karatyus)\
**Post date:** [December 2, 2018, 11:46am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/5 "2018-12-02T11:46:23Z")

</div>

Can you stop shifting the data with the "cadenas" under cerebro to manage your cluster?

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 2, 2018, 1:41pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/6 "2018-12-02T13:41:41Z")

</div>

yes - I tried that.

But the RPM Package (OSS Version) is not marked as possible upgrade for 5.6.13 (default rpm) but as conflict package.

So you are not able to upgrade direct to the OSS package but need to remove elasticsearch first and then install elasticsearch-oss - what will make you loose the data.

The Problem is not that I do not know how to disable data shifting or wipe a node while still having a green cluster (data management is easy if you know how) - but the RPM is not crafted with upgrading users in mind what drives me crazy.

So maybe a nice upgrade way is not described but given.

---

<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:** [December 2, 2018, 3:26pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/7 "2018-12-02T15:26:28Z")

</div>

Not sure what the rpm problem is but few things you might want to consider:

- use the standard version instead of OSS

Or

- move the data dir to a data-tmp dir
- same for config dir
- install the oss rpm version as you wrote (like a clean fresh install)
- stop elasticsearch
- move back the data and config dir
- start elasticsearch

Would that work?

---

<div class="post-metadata">

**Author:** ![Karatyus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karatyus/32/38307_2.png) [@Karatyus](https://discuss.elastic.co/u/Karatyus)\
**Post date:** [December 2, 2018, 6:06pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/8 "2018-12-02T18:06:34Z")

</div>

Sorry @dadoonet for this question, but what Is OSS? I'm beginner, and i try to understand...

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 2, 2018, 6:21pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/9 "2018-12-02T18:21:29Z")

</div>

> [@dadoonet](#):
>
> Would that work?

it looks like not - the elasticsearch-oss rpm is marked as conflict package for elasticsearch.

I would take your words as - we do not have any recommend upgrade path to the elasticsearch-oss package.

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 2, 2018, 6:23pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/10 "2018-12-02T18:23:14Z")

</div>

From the Docs at [Install Elasticsearch with RPM | Elasticsearch Guide [6.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/rpm.html)

> An alternative package which contains only features that are available under the Apache 2.0 license is also available. To install it, use the following `baseurl` in your `elasticsearch.repo` file:  
> baseurl=[https://artifacts.elastic.co/packages/oss-6.x/yum](https://artifacts.elastic.co/packages/oss-6.x/yum)

---

<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:** [December 3, 2018, 6:13am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/11 "2018-12-03T06:13:33Z")

</div>

Is there any specific reason you aren't using the default packages?

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 3, 2018, 7:10am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/12 "2018-12-03T07:10:22Z")

</div>

> [@warkolm](#):
>
> Is there any specific reason you aren't using the default packages?

local legal restrictions. Before the presence of OSS Packages it was grayisch to use the software (and disable features via startup parameters) but with the given OSS Package I would like to polish that up to follow all local rules.

---

<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:** [December 3, 2018, 9:10am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/13 "2018-12-03T09:10:08Z")

</div>

> [@jalogisch](#):
>
> local legal restrictions

Huh, that's kinda unusual!

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 3, 2018, 2:01pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/14 "2018-12-03T14:01:37Z")

</div>

> [@warkolm](#):
>
> Huh, that's kinda unusual!

But a given requirement, I have also opened a issue in Github about that packaging

> <https://github.com/elastic/elasticsearch/issues/36142>
>
> \*\*Elasticsearch version\*\*:
> Elasticsearch 5.6.13 Upgrade to Elasticsearch 6.5 (l…atest)
> 
> \*\*JVM version\*\*:
> \`\`\`
> OpenJDK version "1.8.0\_191"
> OpenJDK Runtime Environment (build 1.8.0\_191-b12)
> OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
> \`\`\`
> 
> \*\*OS version\*\*:
> CentOS 7
> \`\`\`
> Linux c7.lan 3.10.0-862.14.4.el7.x86\_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux
> \`\`\`
> \*\*Description of the problem including expected versus actual behavior\*\*:
> When having Elasticsearch 5.6.13 installed via RPM Package no upgrade option to Elasticsearch 6.5 (oss) is given.
> 
> The \`elasticsearch-oss\` package is marked as a conflict for \`elasticsearch\` but not an upgrade option. 
> 
> When you want to upgrade to the current Version it is not possible without losing the data in the default installation. It would be needed to move the data out of the node before de-installation of \`elasticsearch\` and after installation of \`elasticsearch-oss\` the re-ingest. 
> 
> Having either a clear communication that this upgrade path is not possible or have the option to use that would be nice. 
> 
> Data, and data structure is not the matter in this task - it is simple the settings for the RPM that provide a clean update!
> 
> \*\*Steps to reproduce\*\*:
> 
> 1. Use Centos7 installation
> 2. Install Elasticsearch 5.6 (RPM)
> 3. Upgrade to Elasticsearch-OSS 6.5 (RPM)

I just want to have a clear standing - if that is possible, or if that update path is not given.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [December 3, 2018, 2:58pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/15 "2018-12-03T14:58:09Z")

</div>

The last place I worked had a requirement to only use OSS software as well. We figured you couldn't build free culture stuff out of proprietary tools. Anyway, you should be able to upgrade from 5.6 to 6.5-OSS. I suspect we need to do some package magic to make rpm happy, but it seems legit.

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 7, 2018, 7:08am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/16 "2018-12-07T07:08:13Z")

</div>

he @nik9000 or @warkolm

are you able to give any estimation when a decision will be available if this is a proposed upgrade or if that will not work?

---

<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:** [December 8, 2018, 2:08am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/17 "2018-12-08T02:08:59Z")

</div>

We don't provide timeframes sorry to say.

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [December 8, 2018, 10:29am UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/18 "2018-12-08T10:29:00Z")

</div>

> [@warkolm](#):
>
> We don't provide timeframes sorry to say.

I take that as - we find that valid and will work on this ... as it does not deny that this is a bug.

---

<div class="post-metadata">

**Author:** ![taraso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taraso/32/36996_2.png) [@taraso](https://discuss.elastic.co/u/taraso)\
**Post date:** [December 13, 2018, 11:13pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/19 "2018-12-13T23:13:34Z")

</div>

@jalogisch I am not sure if it is completely clear to me what you mean, but if understand it correctly, @dadoonet 's suggestion seems to be pretty valid here.

To upgrade your ES cluster, you still have to restart your ES nodes, so why not to:

- stop ES
- move data dir aside (so it will be 100% intact)
- upgrade/install ES, whatever is available for your case
- move data dir back
- start ES

This based on my understanding that your _only_ concern is the data dir will be wiped after upgrade/install and you can resolve _everything else_, i.e. the conflicts/different repos.

---

<div class="post-metadata">

**Author:** ![jalogisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalogisch/32/90844_2.png) [@jalogisch](https://discuss.elastic.co/u/jalogisch)\
**Post date:** [January 6, 2019, 12:35pm UTC](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015/20 "2019-01-06T12:35:20Z")

</div>

He @taraso

I would say yes - in small environments or when you have enough time to move hudge amounts of data and have a downtime during that movement.

> [@taraso](#):
>
> This based on my understanding that your _only_ concern is the data dir will be wiped after upgrade/install and you can resolve _everything else_ , i.e. the conflicts/different repos.

My concern is that the OSS package is mentioned as one installation/upgrade option in the documentation but technical it is not possible because of the package meta settings.  
In addition, this is a license issue that because of the changed license you need to install a different package that is no clear upgrade.

[Next page](https://discuss.elastic.co/t/upgrade-from-5-6-to-6-5-oss-without-loosing-data/159015.md?page=2)
