无法在Elasticsearch中注册快照存储库 [英] Can't register a snapshot repository in Elasticsearch

查看:666
本文介绍了无法在Elasticsearch中注册快照存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Elasticsearch 1.4和ubuntu 12.04.3 LTS.Trying来创建Local弹性搜索的快照。我引用这个网站

I am using Elasticsearch 1.4 and ubuntu 12.04.3 LTS.Trying to create a snapshot for Local elasticsearch. I refer this website

此网站的步骤在Windows弹性搜索上正常工作。如果我在Ubuntu Elasticsearch上注册存储库。

This website steps are working fine on windows Elasticsearch. If I Register the repository on Ubuntu Elasticsearch. it fired below message.

此查询我运行的

curl -XPUT http://xx.xx.xx.xx:9200/_snapshot/es_snap -d '{
  "type": "fs",
  "settings": {
    "location": "/mount/backups/my_backup"
  }
}'

我得到了这个响应。

{
  "error":"RepositoryException[[es_snap] failed to create repository]; 
            nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.common.blobstore.BlobStoreException: 
            Failed to create directory at [
              D:/data/es_snapshot_bkup/es_snapshot_repo]\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 [/mount/backups/my_backup]]; ",
  "status":500
}


推荐答案


  1. 首先创建备份文件夹(通常该文件夹创建用户主文件夹)

  1. First create a backup folder(Generally that folder create user home folder)

mkdir ~/backup


  • 授予该文件夹的权限

  • Give permission for that folder

    chmod 777 ~/backup
    


  • 创建一个存储库(Repository表示你的路径)

  • Create a repository (Repository is represent you path)

    curl -XPUT http://xx.xx.xx.xx:9200/_snapshot/es_snap -d 
    '{"type":"fs","settings":{"location":"home/user/backup"
    ,"compress":true}}'
    


  • 快照

  • Snapshot

    curl -XPUT "http://xx.xx.xx.xx:9200/_snapshot/en_snap/snapshot_1" -d 
    '{"indices":["index1","index2","index3"],"ignore_unavailable":true,
    "include_global_state": false,}'
    


  • 恢复

  • Restore

    curl -XPOST "http://xx.xx.xx.xx:9200/_snapshot/es_snap/snapshot_1/_restore" -d 
    '{"indices":["index1","index2"],"ignore_unavailable":true,
    "include_global_state": false}'
    


  • 这篇关于无法在Elasticsearch中注册快照存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆