# Moving From ES 5.x to 7.x and OS Upgrade

**URL:** <https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979>\
**Category:** Elasticsearch\
**Created:** [April 22, 2021, 3:03pm UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979 "2021-04-22T15:03:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [April 22, 2021, 3:03pm UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/1 "2021-04-22T15:03:40Z")

</div>

Good Morning,

I have a clustered ES 5.x environment that I need to do a few things.

1.) Upgrade the Server OS from Ubuntu 16.04 to 18.04 possibly 20.04. When we attempted this last week, we tried to upgrade by using... “sudo do-release-upgrade” then accepting the default and once it was all done, our ES instance was just gone... yeah, gone. So i asked about this earlier this week and trying to plan the best path forward.

2.) Our ES instance is an older version 5.x and we want to upgrade to 7.x.

So if this was your task, what order would you do things and Is there a clean path to upgrade from 5.x to 7.x? Do I need to upgrade to 7.x first or upgrade the OS first and such. We have the cluster back from using VM snapshots and such, so now I need to reapproach this again and im nervous as to the best path forward.

Any insight would be A HUGE THANKS

---

<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:** [April 27, 2021, 2:03am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/2 "2021-04-27T02:03:10Z")

</div>

> [@cis4life](#):
>
> our ES instance was just gone... yeah, gone

Did you use the Ubuntu repo for Elasticsearch or our direct one?

> [@cis4life](#):
>
> So if this was your task, what order would you do things and Is there a clean path to upgrade from 5.x to 7.x?

TBH I would spin up a new cluster with a new OS and then do a remote reindex. It's clean and you have a back out plan.

---

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [April 27, 2021, 2:21am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/3 "2021-04-27T02:21:06Z")

</div>

I believe a direct one if I’m not mistaken. How can i tell? (If you dont mind sheading some light).

I thought about a new and reindexing, but too many things are running against it. I’m thinking of upgrading one node at a time in order to keep the cluster alive. Upgrading the OS first to the latest LTS and then moving from 5.5.1 to 5.6 then to 6.x and then the latest 7.x. This is the way its been laid out in the docs.

Thoughts?

---

<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:** [April 27, 2021, 4:34am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/4 "2021-04-27T04:34:35Z")

</div>

> [@cis4life](#):
>
> I believe a direct one if I’m not mistaken. How can i tell? (If you dont mind sheading some light).

There should be a file under `/etc/repos.d` (I think).

> [@cis4life](#):
>
> I’m thinking of upgrading one node at a time in order to keep the cluster alive

That won't work until you hit 6.8. So to go from 5.X to 6.X you need a complete outage.

---

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [April 28, 2021, 2:48am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/5 "2021-04-28T02:48:48Z")

</div>

Ok,

So I can bring the whole cluster down a while, but what order do i need to upgrade.

Do I need to take each node from 5.5.1 to 5.6 and then from 5.6 to 6.8 then to the latest 7.x?

Also, do I have to reindex the data at some point along the way?

Thanks for this insight,

---

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [April 28, 2021, 2:50am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/6 "2021-04-28T02:50:59Z")

</div>

Also,

Will 5.5.1 work with Ubuntu 20.04? The company wants to get the server OS upgraded first and then plan the upgrade of ES

---

<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:** [April 28, 2021, 3:32am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/7 "2021-04-28T03:32:39Z")

</div>

I'd strongly suggest reading [Upgrade Elasticsearch | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/setup-upgrade.html) and it's sub pages.

---

<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:** [May 26, 2021, 3:33am UTC](https://discuss.elastic.co/t/moving-from-es-5-x-to-7-x-and-os-upgrade/270979/8 "2021-05-26T03:33:15Z")

</div>

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