# Can't restore snapshot

**URL:** https://discuss.elastic.co/t/cant-restore-snapshot/310437
**Category:** Elasticsearch
**Tags:** snapshot-and-restore
**Created:** [July 23, 2022, 3:55am UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437 "2022-07-23T03:55:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![wonderland14](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wonderland14/32/102959_2.png) [@wonderland14](https://discuss.elastic.co/u/wonderland14)
#### Post date: [July 23, 2022, 3:55am UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/1 "2022-07-23T03:55:12Z")

</div>

Hello Everyone, I am trying to restore my snapshot, and this error appeared:

```auto
cannot restore index [.transform-notifications] 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"

```

So, I used this command to closed the open index.

```auto
curl -u user:password123 -XPOST https://localhost:9201/_cluster/.transform-notifcations/_close

```

don't know if there is something wrong with my command coz' I'm having this kind of error:

```auto
{"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}

```

Thanks for your future response 🙂

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [July 23, 2022, 11:18am UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/2 "2022-07-23T11:18:54Z")

</div>

Hi @wonderland14

This [post](https://stackoverflow.com/a/69302298/18778181) teaches 3 ways to solve this problem.

---

<div class="post-metadata">

### Author: ![wonderland14](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wonderland14/32/102959_2.png) [@wonderland14](https://discuss.elastic.co/u/wonderland14)
#### Post date: [July 23, 2022, 11:24am UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/3 "2022-07-23T11:24:57Z")

</div>

may u help me on this one? I tried everything but still not getting the right command to delete or close the hidden index transform-notifications ☹

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [July 23, 2022, 11:37am UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/4 "2022-07-23T11:37:29Z")

</div>

look this [example](https://www.elastic.co/guide/en/elasticsearch/reference/current/restore-snapshot-api.html#restore-snapshot-api-example) to rename the index-name

```auto
POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true
{
  "indices": "index_1,index_2",
  "ignore_unavailable": true,
  "include_global_state": false,
  "rename_pattern": "index_(.+)",
  "rename_replacement": "restored_index_$1",
  "include_aliases": false
}

```

> The following request restores `index_1` and `index_2` from `snapshot_2`. The `rename_pattern` and `rename_replacement` parameters indicate any index matching the regular expression `index_(.+)` will be renamed using the pattern `restored_index_$1` when restored.
> 
> For example, `index_1` will be renamed to `restored_index_1`. `index_2` will be renamed to `restored_index_2`.

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [July 23, 2022, 2:45pm UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/5 "2022-07-23T14:45:10Z")

</div>

We followed the guide how [restore entire cluster](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-restore-snapshot.html#restore-entire-cluster) and we were able to, but first we needed to remove an index lifecycle policy.

---

<div class="post-metadata">

### Author: ![wonderland14](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wonderland14/32/102959_2.png) [@wonderland14](https://discuss.elastic.co/u/wonderland14)
#### Post date: [July 23, 2022, 2:52pm UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/6 "2022-07-23T14:52:34Z")

</div>

Thanks for the help/guide, cluster has been completely restored!

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/87751c1e94fea5d26cd0268234bae0a7d832acea.png)

---

<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: [August 20, 2022, 2:52pm UTC](https://discuss.elastic.co/t/cant-restore-snapshot/310437/7 "2022-08-20T14:52:46Z")

</div>

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