Reputation: 5229
I'm looking to upgrade the major version of an Elasticsearch installation. I have attacked this using different approaches in the past like copying data files and starting a new process, having multiple machines with indexing on both data then switching DNS, and more. I'm wondering if there's a better approach.
Here's my question. I have a single node running Elasticsearch 6.4.2. All indexes are configured with 0 replicas. I'm wondering if I can launch a new Elasticsearch 7.9.2 on the same host and let it join the cluster. Then change all indexes to have 1 replica and let it "copy" all indexes to the version 7 node and keep it updated. I can then start to migrate my code to use v7 APIs and clients and switch them over to the new node one by one. Once everything is running on the new node, I can close down the v6 node and switch back to 0 replicas.
Is this a valid approach in a single node set up?
Upvotes: 0
Views: 491
Reputation: 217254
No, it is not going to work, because 6.4.2 and 7.9.2 are not compatible with each other.
According to the previous link, you first need perform a rolling upgrade to 6.8 and then from 6.8 to 7.9.2.
Also, another thing that you must pay attention to is the version in which your indexes have been created. If that version is too old, you'll need to reindex your data prior to upgrading. A good way to figure this out is to check the Upgrade Assistant in Kibana 7.9.2 which will tell you everything you need to know/do for the upgrade to succeed.
Upvotes: 1