# Setting up replica shards

**URL:** https://discuss.elastic.co/t/setting-up-replica-shards/251551
**Category:** Elasticsearch
**Created:** [October 9, 2020, 10:28am UTC](https://discuss.elastic.co/t/setting-up-replica-shards/251551 "2020-10-09T10:28:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)
#### Post date: [October 9, 2020, 10:28am UTC](https://discuss.elastic.co/t/setting-up-replica-shards/251551/1 "2020-10-09T10:28:56Z")

</div>

How can I increase the number of shard replicas? I have five nodes in the cluster, I want each node to have a copy of each shards.

I found this option on the net, is it correct?

```auto
curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "5"}}' 

```

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [October 9, 2020, 10:35am UTC](https://discuss.elastic.co/t/setting-up-replica-shards/251551/2 "2020-10-09T10:35:28Z")

</div>

Hello Andrew,

It is nearly correct: As the primary shard is stored on a node too I think you want to have 4 replicas. This only affects newly created indexes.  
To change existing indexes have a look [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html).

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)
#### Post date: [October 9, 2020, 10:55am UTC](https://discuss.elastic.co/t/setting-up-replica-shards/251551/3 "2020-10-09T10:55:13Z")

</div>

Thank you very much!

---

<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: [November 6, 2020, 10:55am UTC](https://discuss.elastic.co/t/setting-up-replica-shards/251551/4 "2020-11-06T10:55:23Z")

</div>

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