# Delete snapshot not working in Elasticsearch 1.7.3

**URL:** <https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301>\
**Category:** Elasticsearch\
**Created:** [February 20, 2016, 10:21am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301 "2016-02-20T10:21:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [February 20, 2016, 10:21am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/1 "2016-02-20T10:21:46Z")

</div>

Hi All,

I am trying to delete old snapshots in the ES Repository by using the following curl command but I am getting below error,

Repository name:- backup  
Repository path:- opt/grd/common/ES\_Backup

**Curl command**  
curl --user esadmin:XXXX -XDELETE "10.7.145.22:9200/\_snapshot/backup/snapshot.10-01-2016.item"

**Error in putty**  
[esadmin@dayrhefmtp005 ~]$ cd /opt/grd/common/ES\_Backup  
[esadmin@dayrhefmtp005 ES\_Backup]$ ls -tlr

-rw-rw-r-- 1 esadmin dlmerds 61 Jan 9 21:40 metadata-snapshot.10-01-2016.chr  
-rw-rw-r-- 1 esadmin dlmerds 192 Jan 9 21:41 snapshot-snapshot.10-01-2016.chr  
-rw-rw-r-- 1 esadmin dlmerds 61 Jan 9 21:43 metadata-snapshot.10-01-2016.cval  
-rw-rw-r-- 1 esadmin dlmerds 196 Jan 9 23:01 snapshot-snapshot.10-01-2016.cval  
-rw-rw-r-- 1 esadmin dlmerds 61 Jan 9 23:03 metadata-snapshot.10-01-2016.item  
-rw-rw-r-- 1 esadmin dlmerds 198 Jan 10 03:47 snapshot-snapshot.10-01-2016.item  
-rw-rw-r-- 1 esadmin dlmerds 2420 Jan 20 03:09 metadata-snapshot\_marvel  
-rw-rw-r-- 1 esadmin dlmerds 200 Jan 20 03:10 snapshot-snapshot\_marvel  
-rw-rw-r-- 1 esadmin dlmerds 76 Jan 20 03:10 index  
drwxrwxr-x 7 esadmin dlmerds 243 Jan 20 03:18 indices

[esadmin@dayrhefmtp005 ES\_Backup]$ curl --user esadmin:XXXX -XDELETE "10.7.145.22:9200/\_snapshot/backup/snapshot.10-01-2016.item"  
{"error":"RepositoryException[[backup] failed to update snapshot in repository]; nested: FileNotFoundException[/opt/grd/common/ES\_Backup/index (Permission denied)]; ","status":500}

[esadmin@dayrhefmtp005 ES\_Backup]$ curl --user esadmin:XXXX -XDELETE "10.7.145.22:9200/\_snapshot/backup/snapshot-snapshot.10-01-2016.item"  
{"error":"SnapshotMissingException[[backup:snapshot-snapshot.10-01-2016.item] is missing]; nested: FileNotFoundException[/opt/grd/common/ES\_Backup/snapshot-snapshot-snapshot.10-01-2016.item (No such file or directory)]; ","status":404}

I would like to tell I took backup in ES 1.7.2 version but now I am trying to DELETE snapshot in ES -1.7.3 and I don't think the version will creating the problem. But however I am not able to delete snapshot &

Please help me to resolve this error.

Thanks,  
Ganeshbabu R

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 20, 2016, 3:36pm UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/2 "2016-02-20T15:36:58Z")

</div>

Is elasticsearch running under `esadmin` unix user?

Just to make sure, can you show what gives a `GET _snapshot/backup`

---

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [February 23, 2016, 5:26am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/3 "2016-02-23T05:26:17Z")

</div>

Yes @dadoonet elasticsearch was running under esadmin unix user.

Below is the response of **GET\_snapshot/backup**

{  
"backup": {  
"type": "fs",  
"settings": {  
"compress": "true",  
"location": "/opt/grd/common/ES\_Backup"  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 23, 2016, 5:41am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/4 "2016-02-23T05:41:32Z")

</div>

I have no idea TBH. Looks strange to me. May be @Igor_Motov could have an idea?

---

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [February 23, 2016, 5:56am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/5 "2016-02-23T05:56:33Z")

</div>

Okay @dadoonet Let's see @Igor_Motov give us some input..

---

<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:** [February 23, 2016, 6:01am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/6 "2016-02-23T06:01:38Z")

</div>

@r.ganeshbabu could you ssh to the machine where the master node is running and check how permissions in the directory /opt/grd/common/ES\_Backup/ look like from that machine?

---

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [February 23, 2016, 6:18am UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/7 "2016-02-23T06:18:04Z")

</div>

Hi @Igor_Motov

We have 3 physical servers and following details are nodes setup structure,

Server name -- Node Details  
dayrhetfmp003 -- Master, Data  
dayrhetfmp004 -- Master, Data  
dayrhetfmp005 -- Master, Data, Client

For backup purpose we create folder ES\_backup in the **NAS (opt/grd/common)** and all the machines are mounted to the NAS Path for the creation of repository to take snapshots.  
Below is the permissions in the directory **/opt/grd/common/ES\_Backup/**

-rw-rw-r-- 1 esadmin dmleogrds 61 Jan 9 21:40 metadata-snapshot.10-01-2016.chr  
-rw-rw-r-- 1 esadmin dmleogrds 192 Jan 9 21:41 snapshot-snapshot.10-01-2016.chr  
-rw-rw-r-- 1 esadmin dmleogrds 61 Jan 9 21:43 metadata-snapshot.10-01-2016.cval  
-rw-rw-r-- 1 esadmin dmleogrds 196 Jan 9 23:01 snapshot-snapshot.10-01-2016.cval  
-rw-rw-r-- 1 esadmin dmleogrds 61 Jan 9 23:03 metadata-snapshot.10-01-2016.item  
-rw-rw-r-- 1 esadmin dmleogrds 198 Jan 10 03:47 snapshot-snapshot.10-01-2016.item  
-rw-rw-r-- 1 esadmin dmleogrds 2420 Jan 20 03:09 metadata-snapshot\_marvel  
-rw-rw-r-- 1 esadmin dmleogrds 200 Jan 20 03:10 snapshot-snapshot\_marvel  
-rw-rw-r-- 1 esadmin dmleogrds 76 Jan 20 03:10 index  
drwxrwxr-x 7 esadmin dmleogrds 243 Jan 20 03:18 indices

Thanks,  
Ganeshbabu R

---

<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:** [July 5, 2017, 11:14pm UTC](https://discuss.elastic.co/t/delete-snapshot-not-working-in-elasticsearch-1-7-3/42301/8 "2017-07-05T23:14:17Z")

</div>


