# ElasticSearch Restoration - How to overwrite existing datas

**URL:** <https://discuss.elastic.co/t/elasticsearch-restoration-how-to-overwrite-existing-datas/162134>\
**Category:** Elasticsearch\
**Created:** [December 26, 2018, 11:25am UTC](https://discuss.elastic.co/t/elasticsearch-restoration-how-to-overwrite-existing-datas/162134 "2018-12-26T11:25:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![genseb](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@genseb](https://discuss.elastic.co/u/genseb)\
**Post date:** [December 26, 2018, 11:25am UTC](https://discuss.elastic.co/t/elasticsearch-restoration-how-to-overwrite-existing-datas/162134/1 "2018-12-26T11:25:44Z")

</div>

Hi,

Process a backup using **curl -XPUT "[http://localhost:9200/\_snapshot/s3\_repository/snap1?wait\_for\_completion=true](http://localhost:9200/_snapshot/s3_repository/snap1?wait_for_completion=true)"** command.

When I try to restore this backup, I'm encountering following issue:

{"error":{"root\_cause":[{"type":"snapshot\_restore\_exception","reason":"[2018-12-23:2018-12-24-060001/\_Sb9Wh50SWOeT-3WDWPELg] cannot restore index [.monitoring-es-6-2018.12.19] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"}],"type":"snapshot\_restore\_exception","reason":"[2018-12-23:2018-12-24-060001/\_Sb9Wh50SWOeT-3WDWPELg] cannot restore index [.monitoring-es-6-2018.12.19] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"},"status":500}

Is there a way to overwrite existing index?

Thanks.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [December 26, 2018, 4:30pm UTC](https://discuss.elastic.co/t/elasticsearch-restoration-how-to-overwrite-existing-datas/162134/2 "2018-12-26T16:30:51Z")

</div>

The answer to your question is in the error message that you posted:

> [@genseb](#):
>
> Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name.

For the information on how to close the index, see [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.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:** [January 23, 2019, 4:39pm UTC](https://discuss.elastic.co/t/elasticsearch-restoration-how-to-overwrite-existing-datas/162134/3 "2019-01-23T16:39:54Z")

</div>

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