# Upgrade ElasticSearch 0.16 tot 5.0

**URL:** <https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905>\
**Category:** Elasticsearch\
**Created:** [December 23, 2016, 10:32am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905 "2016-12-23T10:32:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdli907](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sdli907](https://discuss.elastic.co/u/sdli907)\
**Post date:** [December 23, 2016, 10:32am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/1 "2016-12-23T10:32:02Z")

</div>

Hello ES-colleagues/users,

We are currently using a premature version of ES 0.16 in production. Size is 200GB.  
We would like to upgrade to 5.0.  
The documentation states that we need to upgrade per Major Release :  
0.16 -\> 0.90  
0.90 -\> 1.7  
1.4 -\> 2.4  
2.4 -\> 5.0  
Our current environment is a cluster of 2 machines. The gateway is file-based and not local.  
I've installed already a 0.90 version next to the 0.16 version, copied the data block to the 0.90 home, and started the 0.90 engine. But I receive errors that file-based gateway is not supported anymore. When I change the setting to local gateway, ES starts up fine, but ES doesn't find the indices.

Do you have any idea how this can be solved ? Complete reindexation is not an option.

Thanks.

Steven.

---

<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 23, 2016, 10:45am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/2 "2016-12-23T10:45:28Z")

</div>

Any chance you can use the scroll API to read old `_source` fields and bulk them to a new 5.1 cluster?

I'm unsure if reindex from remote API would work but you can give it a try at least.

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [December 23, 2016, 10:51am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/3 "2016-12-23T10:51:54Z")

</div>

> [@sdli907](#):
>
> Complete reindexation is not an option

Why is reindexing not an option? Upgrading across 2 major versions will require reindexing the data anyhow, as document on this page: [Upgrade Elasticsearch | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html)

One possible upgrade path might be to spawn a separate 5.0 cluster and use [reindex from remote](https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade.html) to reindex the data directly fro the 0.16 cluster to the 5.0 cluster.  
If that does not work, you might have to upgrade to 1.7 first and then do the reindex from remote.

---

<div class="post-metadata">

**Author:** ![sdli907](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sdli907](https://discuss.elastic.co/u/sdli907)\
**Post date:** [December 23, 2016, 11:07am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/4 "2016-12-23T11:07:54Z")

</div>

Perhaps malformed. I meant with reindexation, that we can't rebuild the index from scratch.

---

<div class="post-metadata">

**Author:** ![sdli907](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sdli907](https://discuss.elastic.co/u/sdli907)\
**Post date:** [December 23, 2016, 11:16am UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/5 "2016-12-23T11:16:07Z")

</div>

Hello Yannick, I want to upgrade per mayor release  
Step 1 : 0.16 to 0.90  
Step 2 : 0.90 to 1.7  
Step 3 : 1.7 to 2.4  
Step 4 : 2.4 to 5.0  
I am currently stuck with the upgrade to 0.90 as only local gateway is supported. My 0.16 version uses gateway-type "file". I guess this is blocking.  
What do you mean with reindexation ? A rebuild of the already existing old index (which is off course ok for me) ?  
Isn't there a scripted upgrade plan (with the proper commands to be executed) ?

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [December 23, 2016, 12:03pm UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/6 "2016-12-23T12:03:08Z")

</div>

> Isn't there a scripted upgrade plan (with the proper commands to be executed) ?

No, this is a manual process as features could have been removed across major versions, requiring changes to your mappings / settings etc.

> I am currently stuck with the upgrade to 0.90 as only local gateway is supported. My 0.16 version uses gateway-type "file". I guess this is blocking.

I don't know enough about those versions to help you. You could first try to use another upgrade path though that goes directly from 0.16 to 5.0 by using "reindex from remote" (see [Reindex before upgrading | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade.html) ) or just write a small program (like @dadoonet suggested) that extracts the documents from ES 0.16 using the scroll API and indexes them back into the 5.0 cluster) .

---

<div class="post-metadata">

**Author:** ![sdli907](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sdli907](https://discuss.elastic.co/u/sdli907)\
**Post date:** [December 23, 2016, 12:20pm UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/7 "2016-12-23T12:20:40Z")

</div>

Ok, thanks, Yannick, I'll try first the reindex-from-remote. When problems I'll try afterwards the scroll API proposed by @dadoonet.

---

<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:** [January 20, 2017, 12:20pm UTC](https://discuss.elastic.co/t/upgrade-elasticsearch-0-16-tot-5-0/69905/8 "2017-01-20T12:20:47Z")

</div>

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