# Migrate shards from one node set to another

**URL:** <https://discuss.elastic.co/t/migrate-shards-from-one-node-set-to-another/349065>\
**Category:** Elasticsearch\
**Created:** [December 11, 2023, 3:57pm UTC](https://discuss.elastic.co/t/migrate-shards-from-one-node-set-to-another/349065 "2023-12-11T15:57:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hashworks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hashworks/32/129562_2.png) [@hashworks](https://discuss.elastic.co/u/hashworks)\
**Post date:** [December 11, 2023, 3:57pm UTC](https://discuss.elastic.co/t/migrate-shards-from-one-node-set-to-another/349065/1 "2023-12-11T15:57:34Z")

</div>

Hi,

I have three sets of nodes: A, B and C.

Over time, I want to migrate all shards on A and B to C (and remove A and B from the cluster). I could do that all at once by setting the cluster routing allocation setting:

```auto
PUT _cluster/settings
{
  "transient" :{
      "cluster.routing.allocation.exclude._ip" : "[set-a-ips],[set-b-ips]"
   }
}

```

However, I want to start with set A first. How can I migrate the shards on A to C, without allocating them on B?

Also, is it possible to limit the bandwidth used for the reallocation?

Best Regards

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 11, 2023, 5:33pm UTC](https://discuss.elastic.co/t/migrate-shards-from-one-node-set-to-another/349065/2 "2023-12-11T17:33:54Z")

</div>

> [@hashworks](#):
>
> How can I migrate the shards on A to C, without allocating them on B?

I don't think this is possible, you will need to it all at once, or exclude the shards on A, wait for it to finish and then exclude the shards on B.

> [@hashworks](#):
>
> Also, is it possible to limit the bandwidth used for the reallocation?

This is done by default as the default number of concurrent recoveries is 2 and the [max bytes per sec settings for index recovery](https://www.elastic.co/guide/en/elasticsearch/reference/current/recovery.html#recovery-settings) is 40 mb/s for hot and warm 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:** [January 8, 2024, 5:34pm UTC](https://discuss.elastic.co/t/migrate-shards-from-one-node-set-to-another/349065/3 "2024-01-08T17:34:22Z")

</div>

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