Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This technique allows merging two separate Elasticsearch clusters or rename renaming an Elasticsearch cluster, which . This is done performed by retiring an Elasticsearch node "into" a new Elasticsearch cluster.

  1. Join one or more existing nodes to the new cluster by changing

    their

    the cluster.name value to the new cluster’s name. 

  2. Verify the join.

  3. To migrate shards off of the old nodes, decommission Decommission a node by telling the cluster to exclude it from allocation to migrate shards off of the old nodes

    Code Block
    languagebash
    curl -XPUT localhost:9200/_cluster/settings -d '{
      "transient" :{
          "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
       }
    }';echo

    This causes Elasticsearch to allocate the shards on that node to the remaining nodes, which is done performed without the state of the cluster changing to yellow or red (even replication 0).

  4. When Shut down the node when all shards are reallocated, shut down .

  5. Include the node .To for allocation to restore the node to service, include the node for allocation, which causes Elasticsearch to rebalance the shards again.

See the Elasticsearch documentation.