我需要在Linux中进行弹性搜索备份,如果我获得该备份文件夹的权限,则会创建存储库。
mkdir /home/user/ES
chmod 777 /home/user/ES
curl -XPUT localhost:9200/_snapshot/myback -d '{"type":"fs","settings":{"location":"/home/user/ES","compress":true}}'
{ acknowledge : true }...
没有创建备份文件夹(/home/user/ES
)并授予该文件夹显示错误消息的权限
curl -XPUT localhost:9200/_snapshot/myback -d '{"type":"fs","settings":{"location":"/home/user/ES","compress":true}}'
回复:
{"error":"RepositoryException[[myback] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed to create directory at [/home/bigdata/ES]\n at org.elasticsearch.repositories.fs.FsRepository.<init>(Unknown Source)\n while locating org.elasticsearch.repositories.fs.FsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error]; nested: BlobStoreException[Failed to create directory at [/home/bigdata/ES]]; ","status":500}
我需要没有创建备份文件夹,并且没有为该文件夹授予权限。
请提供可能的解决方案..