# Snapshot restoration failures - FileAlreadyExistsException

**URL:** https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976
**Category:** Elasticsearch
**Tags:** snapshot-and-restore
**Created:** [July 29, 2021, 11:40am UTC](https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976 "2021-07-29T11:40:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Vamsi\_Htc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vamsi_htc/32/90945_2.png) [@Vamsi\_Htc](https://discuss.elastic.co/u/Vamsi_Htc)
#### Post date: [July 29, 2021, 11:40am UTC](https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976/1 "2021-07-29T11:40:14Z")

</div>

We are facing issues with restoring a snapshot from s3 bucket and the we are seeing below error.

ES version 5.6.3

Two of our nodes went down which got both primary and replicas which resulted in cluster turning into red . We opted for snapshot restore but failed due to below . Do we always need to delete index before performing snapshot restore .

On some occasions we tried to restore snapshot on existing index with a week old snapshot and worked without any issues .

[2021-07-11T23:12:09,172][WARN][o.e.c.a.s.ShardStateAction] [DvtNg\_b] [default-index][0] received shard failed for shard id [[default-index][0]], allocation id [PUCjSwFbS7Oj2ELhKuN4oA], primary term [0], message [failed recovery], failure [RecoveryFailedException[[default-index][0]: Recovery failed on {QJIcKkY}{QJIcKkYiSd-WgZAVbCJNpw}{dWA1m7CTROyVUybD4wgtqw}{10.XX.XXX.XXX}{10.XX.XXX.XXX:9300}{aws\_availability\_zone=eu-west-1c}]; nested: IndexShardRecoveryException[failed recovery]; nested: IndexShardRestoreFailedException[restore failed]; nested: IndexShardRestoreFailedException[failed to restore snapshot [snapshot\_1626033808/dkGnKrdRSb-62t-cO5zcoA]]; nested: IndexShardRestoreFailedException[Failed to recover index]; nested: FileAlreadyExistsException[/var/lib/elasticsearch/nodes/0/indices/NE-108vTRhaZvja7btbylg/0/index/\_gt34t.cfs]; ]

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [July 29, 2021, 2:16pm UTC](https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976/2 "2021-07-29T14:16:51Z")

</div>

Not sure what version you're really using (5.7.3 was never released) but the last version that ever emitted this message is 2 years past [EOL](https://www.elastic.co/support/eol). You should upgrade. I can't say much about such ancient versions, but can confirm that in recent versions there's no need to delete an index before restoring it from a snapshot.

---

<div class="post-metadata">

### Author: ![Vamsi\_Htc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vamsi_htc/32/90945_2.png) [@Vamsi\_Htc](https://discuss.elastic.co/u/Vamsi_Htc)
#### Post date: [July 29, 2021, 2:26pm UTC](https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976/3 "2021-07-29T14:26:31Z")

</div>

COrrection the verison is 5.6.3 and there are some plugin dependencies which is stopping us for upgrade . we have plans to upgrade this in future . Can u shed some light on what is best approach to avoid such errors .

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [July 29, 2021, 2:33pm UTC](https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976/4 "2021-07-29T14:33:18Z")

</div>

I have no better advice than to upgrade, sorry.

---

<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 26, 2021, 2:33pm UTC](https://discuss.elastic.co/t/snapshot-restoration-failures-filealreadyexistsexception/279976/5 "2021-08-26T14:33:37Z")

</div>

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