# Best strategy to join two clusters

**URL:** <https://discuss.elastic.co/t/best-strategy-to-join-two-clusters/346883>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [November 10, 2023, 4:04pm UTC](https://discuss.elastic.co/t/best-strategy-to-join-two-clusters/346883 "2023-11-10T16:04:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)\
**Post date:** [November 10, 2023, 4:04pm UTC](https://discuss.elastic.co/t/best-strategy-to-join-two-clusters/346883/1 "2023-11-10T16:04:08Z")

</div>

Hi, A customer hand me two clusters, these are in two servers, on each server there are 3 nodes on dockers, what will the best strategy to join these two clusters?

Also I was thinking that would be better to get rid of docker, it is posible to mantain the data and use the only one instance of elastic on the server? I imagine that i have to move all shards to one docker node, but It will be any inconvinience?

Thanks!

---

<div class="post-metadata">

**Author:** ![sholzhauer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sholzhauer/32/110282_2.png) [@sholzhauer](https://discuss.elastic.co/u/sholzhauer)\
**Post date:** [November 10, 2023, 10:54pm UTC](https://discuss.elastic.co/t/best-strategy-to-join-two-clusters/346883/2 "2023-11-10T22:54:36Z")

</div>

I feel like cross cluster search and cross cluster replication could help you with moving the data and phasing out one cluster.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 11, 2023, 7:05am UTC](https://discuss.elastic.co/t/best-strategy-to-join-two-clusters/346883/3 "2023-11-11T07:05:36Z")

</div>

There is no way to join two clusters in Elasticsearch, and a node that has been a part of one cluster can not be made to join another while retaining data and cluster state. It has to join the new cluter as a new, completely empty node.

You will therefore need to [take a snaphot of the data in cluster B and then restore this to cluster A](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/modules-snapshots.html). You can then clear the nodes in cluster B and configure them to join cluster A as new, fresh nodes.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 9, 2023, 7:06am UTC](https://discuss.elastic.co/t/best-strategy-to-join-two-clusters/346883/4 "2023-12-09T07:06:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
