# Snapshot Api not working

**URL:** <https://discuss.elastic.co/t/snapshot-api-not-working/91985>\
**Category:** Elasticsearch\
**Created:** [July 5, 2017, 9:27pm UTC](https://discuss.elastic.co/t/snapshot-api-not-working/91985 "2017-07-05T21:27:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrenikgala](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@shrenikgala](https://discuss.elastic.co/u/shrenikgala)\
**Post date:** [July 5, 2017, 9:27pm UTC](https://discuss.elastic.co/t/snapshot-api-not-working/91985/1 "2017-07-05T21:27:43Z")

</div>

Hello,  
I'm running ES 2.4.4 and trying to use the snapshot API but I 'm getting the following error:

```
{"error":{"root_cause":[{"type":"exception","reason":"failed to create blob container"}],"type":"exception","reason":"failed to create blob container","caused_by":{"type":"access_denied_exception","reason":"/var/lib/elasticsearch/data/es_snapshots/tests-JyPFj3wmSCq3UaxKnZcSAA"}},"status":500}

```

The command I've used to run the snapshot API is :

```
curl -XPUT -u user:passwd -k 'https://localhost:9200/_snapshot/my_backup' -d '{ "type": "fs", "settings": { "location": "/var/lib/es_snapshots", "compress": true } }'

```

I've also used the same command with a different location:

```
curl -XPUT -u user:passwd -k 'https://localhost:9200/_snapshot/my_backup' -d '{ "type": "fs", "settings": { "location": "/var/lib/elasticsearch/data/es_snapshots", "compress": true } }'

```

The path configurations for my ES look like this:

```
"path" : {
      "conf" : "/etc/elasticsearch",
      "data" : "/var/lib/elasticsearch/data",
      "logs" : "/var/log/elasticsearch",
      "home" : "/usr/share/elasticsearch",
      "repo" : ["/var/lib/es_snapshots", "/var/lib/elasticsearch/data/es_snapshots"]
    }
```

---

<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 2, 2017, 9:27pm UTC](https://discuss.elastic.co/t/snapshot-api-not-working/91985/2 "2017-08-02T21:27:48Z")

</div>

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