# Errors when trying to create snapshot

**URL:** <https://discuss.elastic.co/t/errors-when-trying-to-create-snapshot/34258>\
**Category:** Elasticsearch\
**Created:** [November 10, 2015, 3:20pm UTC](https://discuss.elastic.co/t/errors-when-trying-to-create-snapshot/34258 "2015-11-10T15:20:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyosick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tyosick/32/5814_2.png) [@tyosick](https://discuss.elastic.co/u/tyosick)\
**Post date:** [November 10, 2015, 3:20pm UTC](https://discuss.elastic.co/t/errors-when-trying-to-create-snapshot/34258/1 "2015-11-10T15:20:19Z")

</div>

I created the repository by using this command:

curl -XPUT 'localhost:9200/\_snapshot/backups' -d '  
{  
"type": "fs",  
"settings": {  
"location": "/opt/elasticsearch\_backups",  
"compress": "true"  
}  
}'

It ran successfully. Next, I try to run a snapshot via this command:

curator snapshot --repository /opt/elasticsearch\_backups indices --older-than 1 --time-unit days --timestring %Y.%m.%d --all-indices --exclude ".kibana"

But it throws an error.

```
RepositoryMissingException[[/opt/elasticsearch_backups] missing]
        at org.elasticsearch.repositories.RepositoriesService.repository(RepositoriesService.java:330)
        at org.elasticsearch.repositories.RepositoriesService.verifyRepository(RepositoriesService.java:209)
        at org.elasticsearch.action.admin.cluster.repositories.verify.TransportVerifyRepositoryAction.masterOperation(TransportVerifyRepositoryAction.java:73)
        at org.elasticsearch.action.admin.cluster.repositories.verify.TransportVerifyRepositoryAction.masterOperation(TransportVerifyRepositoryAction.java:41)
        at org.elasticsearch.action.support.master.TransportMasterNodeAction$3.doRun(TransportMasterNodeAction.java:130)
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 10, 2015, 3:26pm UTC](https://discuss.elastic.co/t/errors-when-trying-to-create-snapshot/34258/2 "2015-11-10T15:26:19Z")

</div>

Pass `--repository backups` to Curator, not `--repository /opt/elasticsearch_backups`.

---

<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:39pm UTC](https://discuss.elastic.co/t/errors-when-trying-to-create-snapshot/34258/3 "2017-07-05T23:39:26Z")

</div>


