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 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 without data backup, you cannot roll back to the previous Elasticsearch version. Therefore, it is recommended to back up data before upgrading to a higher version.
We can use a complete 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 using the rolling upgrade method.
Test the upgrade in the development environment before upgrading the production cluster.
Back up your data. Unless you have a data snapshot, you cannot roll back to an earlier version.
Before starting the upgrade process, consider shutting down machine learning jobs. Although machine learning jobs can continue to run during rolling upgrades, they will increase the cluster overhead during the upgrade process.
Upgrade the components of the Elastic Stack in the following order-
Elasticsearch
Kibana
Logstash
Beats
APM Server
To upgrade from6.0-6.6version upgrade directly to Elasticsearch 7.1.0, you must manually reindex all the necessary5.x index, and perform a complete cluster restart.
完整集群重新启动的过程包括关闭集群中的每个节点,将每个节点升级到7x,然后重新启动集群。
以下是完整集群重新启动需要执行的高级步骤-
禁用碎片分配
停止索引并执行同步刷新
关闭所有节点
升级所有节点
升级任何插件
启动每个升级的节点
等待所有节点加入集群并报告黄色状态
重新启用分配
After re-enabling allocation, the cluster will begin to allocate replica fragments to data nodes. At this time, it is safe to restore indexes and search, but if you can wait until all primary fragments and replica fragments have been successfully allocated and all nodes are green, the cluster will recover faster.