Reindex from a remote cluster

You can use reindex from remote to migrate indices from your old cluster to a new 6.x cluster. This enables you move to 6.x from a pre-5.6 cluster without interrupting service.


To migrate your indices:

  1. Set up a new 6.x cluster alongside your old cluster. Enable it to access your old cluster by adding your old cluster to the reindex.remote.whitelist in elasticsearch.yml:

    reindex.remote.whitelist: oldhost:9200


  2. For each index that you need to migrate to the 6.x cluster:

    1. Create a new index in 6.x with the appropriate mappings and settings. Set the refresh_interval to -1 and set number_of_replicas to 0 for faster reindexing.
    2. Reindex from remote to pull documents from the old index into the new 6.x index:

      POST _reindex
        "source": {
          "remote": {
            "username": "user",
            "password": "pass"
          "index": "source",
          "query": {
            "match": {
              "test": "data"
        "dest": {
          "index": "dest"


    4. Once replication is complete and the status of the new index is green, you can delete the old index.