Simplest upgrade data from ElasticSearch 2 to ElasticSearch 6

elasticsearch

We're looking to migrate our clusters with ElasticSearch 2.x to the latest version. What is the simplest way to do this?

I already wrote a deploy script for deploying the ELK 2 stack and the ELK 6 stack. Unfortunately ElasticSearch 6.x cannot read data from ElasticSearch 2.x.

Go via ElasticSearch 5

Is it worth to make also a deploy script for an ELK-5, so it will automatically upgrade all my data without data loss? It's mostly logs.

Then we'd have to do 2 deploys on all environments and ElasticSearch would convert all data for us from the old to the newer version.

ElasticSearch 2 and 6 next to each other

Can we not better change the fluentd configuration to write log files to both ELK-2 and ELK-6 for a week at the same time. Then we delete the ELK-2 cluster a week later? That way we don't have to do weird stuff with building a new ElasticSearch-5 script and going through 2 deploys and 2 data upgrades.

Best Answer

Both upgrade and build new are possible. Which to use is your decision, depending on what data you want to keep and how much time you want to spend doing upgrades.

Upgrade in place stops at 5, yes. Migration plugin checks, full cluster restart to get to 5, rolling restart to get to 6.

Building a new 6 skips the upgrade step, but you will not have old indices. You may ingest on both 2 and 6 in parallel if you app supports that. You may use reindex from remote to import from the older cluster.

Related Topic