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)