Hi,
iam trying to elasticsearch index take backup (snopshot) using Hadoop HDFS respository
but showing following errors:
elasticsearch version = 2.4.1
Appache hadoop version=2.7.1
Steps1 : install hdfs Repo plugin
bin/plugin --install elasticsearch/elasticsearch-repository-hdfs/2.0.0-hadoop2
step2 : start elasticseach server
step3 : start the hadoop
step 4 : create snopshot repository
curl -XPOST 'http://localhost:9200/_snapshot/hdfsrepository' -d'{
"type": "hdfs",
"settings": {
"uri": "hdfs://localhost:9000/",
"path": "hdfsbackup",
"conf_location":"/usr/local/hadoop/etc/hadoop/hdfs-site.xml,/usr/local/hadoop/etc/hadoop/core-site.xml",
"compress": true
}
}'
return response : {"acknowledged":true}
step5 : specific index name based on take snopshot
index name = my_index
curl -XPUT localhost:9200/_snapshot/hdfsrepository -d '{
"type": "hdfs",
"indices": "my_index",
"ignore_unavailable": "true",
"include_global_state": false,
"partial": true
}'
return response ERROR
{
"error": {
"root_cause": [
{
"type": "repository_exception",
"reason": "[hdfsrepository] failed to create repository"
}
],
"type": "repository_exception",
"reason": "[hdfsrepository] failed to create repository",
"caused_by": {
"type": "creation_exception",
"reason": "Guice creation errors:\n\n1) Error injecting constructor, java.lang.IllegalArgumentException: no 'path' defined for hdfs snapshot/restore\n at org.elasticsearch.repositories.hdfs.HdfsRepository.(Unknown Source)\n while locating org.elasticsearch.repositories.hdfs.HdfsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "no 'path' defined for hdfs snapshot/restore"
}
}
},
"status": 500
}