English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
In any system or software, when we upgrade to a newer version, we need to follow some steps to maintain application settings, configuration, data, and other content. These steps are necessary to ensure the stability of the application in the new system or to maintain data integrity (prevent data corruption).
You need to follow the following steps to upgrade Elasticsearch-
fromhttps://www.elastic.co/Read the upgrade documentation
in non-production environments (such as UAT, E2E, SIT, or DEV environment) to test the upgrade version.
Please note that if there is no data backup, you cannot roll back to the previous Elasticsearch version. Therefore, it is recommended to back up the data before upgrading to a higher version.
We can use a full cluster restart or rolling upgrade for the upgrade. Rolling upgrade is suitable for new versions. Note that there will be no service interruption during the migration when using the rolling upgrade method.
Test the upgrade in a development environment before upgrading the production cluster.
Backup your data. Unless you have a data snapshot, you cannot roll back to an earlier version.
Before starting the upgrade process, consider stopping machine learning jobs. Although machine learning jobs can continue to run during rolling upgrades, they will increase the overhead of the cluster during the upgrade process.
Upgrade the components of Elastic Stack in the following order-
Elasticsearch
Kibana
Logstash
Beats
APM Server
To upgrade from6.0-6.6version directly upgrade to Elasticsearch 7.1.0, you must manually reindex all the necessary5.x index, and perform a full cluster restart.
The process of fully restarting the cluster includes shutting down each node in the cluster, upgrading each node to7x, then restart the cluster.
The following are advanced steps that need to be executed to fully restart the cluster-
Disable fragment allocation
Stop indexing and perform synchronous refresh
Shut down all nodes
Upgrade all nodes
Upgrade any plugins
Start each upgraded node
Wait for all nodes to join the cluster and report a yellow state
Re-enable allocation
After the allocation is re-enabled, the cluster will start to allocate fragment replicas to data nodes. At this time, it is safe to restore indexes and search, but if you can wait until all primary and replica fragments have been successfully allocated and all nodes are green, the cluster will recover faster.