# Fail to Create Repository for Snapshots

**URL:** <https://discuss.elastic.co/t/fail-to-create-repository-for-snapshots/64495>\
**Category:** Elasticsearch\
**Created:** [October 31, 2016, 9:55pm UTC](https://discuss.elastic.co/t/fail-to-create-repository-for-snapshots/64495 "2016-10-31T21:55:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim/32/48260_2.png) [@tim](https://discuss.elastic.co/u/tim)\
**Post date:** [October 31, 2016, 9:55pm UTC](https://discuss.elastic.co/t/fail-to-create-repository-for-snapshots/64495/1 "2016-10-31T21:55:41Z")

</div>

ELK Stack on single node  
ES 1.2.4  
Curator 3.5.1

Want to create repository on attached NAS to save snapshots.  
Running everything as root to test.  
Created es\_repo under /mnt/NAS/  
drwxrwxrwx 1 root elasticsearch 0 Oct 31 16:02 es\_repo

es\_repo\_mgr --host create fs --location "/mnt/NAS" --repository "es\_repo"  
2016-10-31 16:48:51,508 INFO Checking if repository es\_repo already exists...  
2016-10-31 16:48:51,511 ERROR Repository es\_repo not found.  
2016-10-31 16:48:51,511 INFO Repository es\_repo not in Elasticsearch. Continuing...  
2016-10-31 16:48:51,659 INFO Repository es\_repo creation initiated...  
2016-10-31 16:48:51,662 INFO Repository es\_repo creation validated.

curl -XGET 'http://:9200/\_snapshot'  
{"es\_repo":{"type":"fs","settings":{"compress":"true","location":"/mnt/NAS"}}}

[root@logstash ~]# es\_repo\_mgr --host 192.203.196.14 create fs --location "/mnt/NAS" --repository "es\_repo"  
2016-10-31 16:48:51,508 INFO Checking if repository es\_repo already exists...  
2016-10-31 16:48:51,511 ERROR Repository es\_repo not found.  
2016-10-31 16:48:51,511 INFO Repository es\_repo not in Elasticsearch. Continuing...  
2016-10-31 16:48:51,659 INFO Repository es\_repo creation initiated...  
2016-10-31 16:48:51,662 INFO Repository es\_repo creation validated.

Repository created but unable to snapshot

curator --host snapshot --repository es\_repo indices --older-than 44 --time-unit days --timestring %Y.%m.%d  
2016-10-31 16:50:59,667 INFO Job starting: snapshot indices  
2016-10-31 16:50:59,667 INFO Overriding default connection timeout for snapshot action. New timeout: 21600  
2016-10-31 16:50:59,718 INFO Action snapshot will be performed on the following indices: [u'logstash-2016.09.17']  
2016-10-31 16:50:59,764 INFO Snapshot name: curator-20161031215059  
2016-10-31 16:50:59,850 ERROR Client raised a TransportError.  
2016-10-31 16:50:59,851 WARNING Job did not complete successfully.

org.elasticsearch.snapshots.SnapshotCreationException: [es\_repo:curator-20161031215059] failed to create snapshot  
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.initializeSnapshot(BlobStoreRepository.java:252)  
at org.elasticsearch.snapshots.SnapshotsService.beginSnapshot(SnapshotsService.java:276)  
at org.elasticsearch.snapshots.SnapshotsService.access$600(SnapshotsService.java:88)  
at org.elasticsearch.snapshots.SnapshotsService$1$1.run(SnapshotsService.java:202)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.io.FileNotFoundException: /mnt/NAS/snapshot-curator-20161031215059 (Permission denied)  
at java.io.RandomAccessFile.open(Native Method)  
at java.io.RandomAccessFile.(RandomAccessFile.java:241)  
at org.elasticsearch.common.blobstore.fs.FsImmutableBlobContainer$1.run(FsImmutableBlobContainer.java:50)

---

<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, 10:08pm UTC](https://discuss.elastic.co/t/fail-to-create-repository-for-snapshots/64495/2 "2017-07-05T22:08:04Z")

</div>


