Upgrade ElasticSearch 0.16 tot 5.0

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.

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.

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

One possible upgrade path might be to spawn a separate 5.0 cluster and use reindex from remote 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.

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

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) ?

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 ) 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) .

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

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