Hi everyone,
I pop in since I'm encountering the same problem.
I'm running Elasticsearch on a Ubuntu Server 12.04. I need to implement an automatic snapshot rotation and for this reason I tried to use curator in order to implement some sort of snapshot scheduler.
-
I have added the following row inside the elasticsearch.yml file:
path.repo: /var/backups/elasticsearch/
-
Changed the permissions for the aforementioned folder (so that every user can read/write it/in it):
sudo chmod -R 777 /var/backups/elasticsearch/
-
Run the following command:
curl -XPUT 'http://localhost:9200/_snapshot/backup' -d '{
"type": "fs",
"settings": {
"location": "/var/backups/elasticsearch/",
"compress": true
}
}'
-
Checked whether the repository was created correctly:
curl -XGET 'http://localhost:9200/_snapshot/backup?pretty'
{
"backup" : {
"type" : "fs",
"settings" : {
"compress" : "true",
"location" : "/var/backups/elasticsearch/"
}
}
} -
Tried to create a snapshot through curator but I get the following error:
curator snapshot --repository backup indices --all-indices --exclude kibana-int
2015-07-09 17:42:52,529 INFO Job starting: snapshot indices
2015-07-09 17:42:52,529 WARNING Overriding default connection timeout. New timeout: 21600
2015-07-09 17:42:52,549 INFO Matching all indices. Ignoring flags other than --exclude.
2015-07-09 17:42:52,594 ERROR Failed to verify all nodes have repository access.
2015-07-09 17:42:52,595 WARNING Job did not complete successfully.
The paths are correct, the permissions too. I honestly have no idea about what's wrong there.
I've tried to run the script in --dry-run mode and it "works" correctly.
Any suggestion?
Thank you very much
Alessandro
ps, I tried to create a snapshot manually with the following command:
curl -XPUT "localhost:9200/_snapshot/backup/test?wait_for_completion=true"
and it was created correctly