# How to allocate replicas to specified nodes

**URL:** <https://forum.opensearch.org/t/how-to-allocate-replicas-to-specified-nodes/15452>\
**Category:** OpenSearch\
**Created:** [August 7, 2023, 4:52am UTC](https://forum.opensearch.org/t/how-to-allocate-replicas-to-specified-nodes/15452 "2023-08-07T04:52:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.hunter](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@james.hunter](https://forum.opensearch.org/u/james.hunter)\
**Post date:** [August 7, 2023, 4:52am UTC](https://forum.opensearch.org/t/how-to-allocate-replicas-to-specified-nodes/15452/1 "2023-08-07T04:52:32Z")

</div>

Is there a way to have replicas allocated only to specific nodes?

Why? We are doing an ‘over the wire’ migration from Elasticsearch to OpenSearch and would like the source cluster to remain as the ‘primary’ cluster while data is replicated to OpenSearch.

After joining the destination nodes to the source cluster, we would like to increase replication and have the replicas allocate to the destination nodes and not on other source cluster nodes.

**Configuration** :

Source - ElasticSearch 6.8  
Destination - OpenSearch 1.11

I have tried setting `cluster.routing.allocation.awareness.attributes` coupled with `node.attr.` and `cluster.routing.allocation.require.` however unable to get a split of primary shards on the source nodes and replicas on the destination nodes.

Thanks

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [August 7, 2023, 10:46am UTC](https://forum.opensearch.org/t/how-to-allocate-replicas-to-specified-nodes/15452/2 "2023-08-07T10:46:47Z")

</div>

How about moving replicas to the specified nodes by reroute api?
