# How to set no of replicas to 0

**URL:** https://discuss.elastic.co/t/how-to-set-no-of-replicas-to-0/195725
**Category:** Elasticsearch
**Created:** [August 19, 2019, 11:14am UTC](https://discuss.elastic.co/t/how-to-set-no-of-replicas-to-0/195725 "2019-08-19T11:14:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Shubham\_Yadav1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shubham_yadav1/32/41659_2.png) [@Shubham\_Yadav1](https://discuss.elastic.co/u/Shubham_Yadav1)
#### Post date: [August 19, 2019, 11:14am UTC](https://discuss.elastic.co/t/how-to-set-no-of-replicas-to-0/195725/1 "2019-08-19T11:14:03Z")

</div>

I have setup aws elasticsearch where a new index is created everyday, when i see the index using \_cat api i see two different size of index that are store.size(7.8) pri.store.size(3.8), I think this is happening because no of replicas is set to 1 in index setting. How can i set it to 0 permanently for all the indices ?  
someone please help.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 19, 2019, 12:43pm UTC](https://discuss.elastic.co/t/how-to-set-no-of-replicas-to-0/195725/2 "2019-08-19T12:43:20Z")

</div>

just a word if warning: this means, you are increasing the risk of dataloss, as there . is no copy of your data available within your cluster anymore.

You could create an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/indices-templates.html) that sets the number of replicas, which automatically applies for the indices that match the pattern.

you can also change the number of replicas for existing indices, see [https://www.elastic.co/guide/en/elasticsearch/reference/7.3/indices-update-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/indices-update-settings.html)

---

<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: [September 16, 2019, 12:43pm UTC](https://discuss.elastic.co/t/how-to-set-no-of-replicas-to-0/195725/3 "2019-09-16T12:43:20Z")

</div>

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