Essentially I cannot find documents or resources that explains the procedure of upgrading a running Elasticsearch instance into the current version.
Please help me out in a few scenarios:
If I am running an Elasticsearch instance in a single server, how do I upgrade the instance and not lose data?
If I am running multiple Elasticsearch instances in a number of servers, how do I keep my operations running, while I upgrade my Elasticsearch instances without losing data?
If there are proper procedures or explanations on this it will greatly help my understanding and work. Thanks!
To upgrade to 8.3. 3 from 7.16 or an earlier version, you must first upgrade to 7.17, even if you opt to do a full-cluster restart instead of a rolling upgrade. This enables you to use the Upgrade Assistant to identify and resolve issues, reindex indices created before 7.0, and then perform a rolling upgrade.
A rolling upgrade allows an Elasticsearch cluster to be upgraded one node at a time so upgrading does not interrupt service.
All node data is stored in elasticsearch data directory. It's data/cluster_name/nodes by default in elasticsearch home. So, in general, as long as data directory is preserved and config files in the new version are compatible with the old version, the new instance should have the same data as the old one. Please note that some releases have special additional requirements outlined in release notes. For example, upgrade to 0.19 from 0.18 requires issuing a full flush of all the indices in the cluster.
There is really no good way to accomplish this. Nodes are communicating using binary protocol that is not backward compatible. So, if protocol in the new version changes, old nodes and new nodes are unable to understand each other. Sometimes it's possible to mix nodes with different minor versions within the same cluster and do rolling upgrade. However, as far as I understand, there is no explicit guarantee on compatibility between nodes even within minor releases and major releases always require require full cluster restart. If downtime during full cluster restart is not an option, a nice technique by DrTech might be a solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With