How to

Elastic Support Alert: Upgrading Your Elasticsearch 1.7 Cluster on Elastic Cloud

This blog post outlines the upgrade path that you can use to upgrade your Elasticsearch 1.7 cluster hosted on Elasticsearch Service to a supported version. Newer versions of Elasticsearch include an incredible amount of features like Canvas, Beats, APM and much more. Keeping a cluster updated to the latest version also provides other benefits, such as access to the latest security patches and performance improvements.

As per our product end-of-life policy, Elasticsearch 1.7 reached end of life (EOL) 26 months ago. In late 2018, we began an email campaign informing customers that Elasticsearch Service will cease operations for Elasticsearch 1.7 clusters on April 8, 2019. Although Elasticsearch Service makes upgrading to the next major version very easy via the console, unfortunately this upgrade path isn’t available for extremely old versions of Elasticsearch.

At a minimum, you need to use the steps in this blog post to upgrade to version 5.6.x, but we recommend that you also upgrade to Elasticsearch 6.x to avoid having to deal with an EOL version again in the near future. You should stay on version 5.6.x only if you cannot switch to a single mapping type for indices easily and need more time before upgrading to 6.x.

How to upgrade your Elasticsearch 1.7 cluster

  1. Log into the Elasticsearch Service console.
  2. Create a new 5.6.x deployment using the latest available version.
  3. Index your data into the new deployment:
    • If you have access to the source, index all of your data directly into the new deployment from the source application.
    • Alternatively, if you do not have access to the data source, you can use reindex from remote from your new 5.6.x deployment, where the source is set to your existing Elasticsearch 1.7 deployment. As described below, ensure that breaking changes, like mapping updates for string data types, are addressed prior to reindexing. Please also note, it would be advisable to create these indices with the appropriate mappings beforehand.

      POST _reindex
      {
        "source": {
          "remote": {
            "host": "https://SOURCE_1_7_CLUSTER_URL:9243",
            "username": "SOURCE_1_7_CLUSTER_USERNAME",
            "password": "SOURCE_1_7_CLUSTER_PASSWORD"
          },
          "index": "INDEX_NAME",
          "query": {
            "match_all": {
            }
          }
        },
        "dest": {
          "index": "INDEX_NAME"
        }
      }
              

      Important: Be sure to replace SOURCE_1_7_CLUSTER_URL, SOURCE_1_7_CLUSTER_USERNAME, SOURCE_1_7_CLUSTER_PASSWORD, and INDEX_NAME with your own information.
  4. Upgrade to 6.6.x via the Elasticsearch Service console using the Upgrade Assistant.

There are some breaking changes to be aware of, though this list is not exhaustive. Please reference the breaking changes for 5.x or 6.x, depending on which version you are upgrading to:

  • When upgrading from 1.7 to 5.6/6.x, the ‘string’ data type was used for all text strings, with "type": "string", "index": "analyzed" for full text search capable fields and "type": "string", "index": "not_analyzed" for fields that required an exact value. To learn more, see Strings are dead, long live strings! This behavior has been changed and simplified:
  • A full list of the breaking changes introduced with each major and minor update can be found in our documentation for each version: 2.x, 5.x, 6.x. The breaking changes for minor version are listed in the documentation menu.

If none of the options in this blog post work for you, you can also consider moving your data off Elasticsearch Service entirely and run Elasticsearch on your own. To get your data off Elasticsearch Service, snapshot your Elasticsearch 1.7 cluster to a custom repository and then restore the snapshot to a self-managed Elasticsearch 1.7 cluster. Note that this version of Elasticsearch is known to have security issues, is no longer being patched, and is not recommended.

We’ve added a huge amount of new functionality to the Elastic Stack since Elasticsearch 1.7. If you haven't seen them yet, explore the new features that have been released in the past few years, or even join the 7.0 Elastic Pioneer Program to test out features that are just around the corner.