【问题标题】:Storing elasticsearch snapshots in amazon s3 repository. How does it work在 amazon s3 存储库中存储弹性搜索快照。它是如何工作的
【发布时间】:2017-09-14 18:56:51
【问题描述】:

我在本地 Linux 机器上安装了 elasticsearch 2.3。 我有 Amazon S3 存储:我知道区域、存储桶名称、访问密钥和密钥。

我想在我的 S3 存储中创建弹性搜索索引的快照。有关于它的文档here,但它没有向我解释任何事情(我是全新的。)。

因此,例如,我正在尝试执行此命令:

curl -XPUT 'localhost:9200/_snapshot/my_s3_repository?pretty' -H 'Content-Type: application/json' -d '{"type": "s3",
 "settings": {"bucket": "ilyabackuptest1", "region": "us-east-1" }}'

我得到了回应:

{
  "error" : {
    "root_cause" : [ {
      "type" : "repository_exception",
      "reason" : "[my_s3_repository] failed to create repository"
    } ],
    "type" : "repository_exception",
    "reason" : "[my_s3_repository] failed to create repository",
    "caused_by" : {
      "type" : "illegal_argument_exception",
      "reason" : "Unknown [repository] type [s3]"
    }
  },
  "status" : 500
}

那么它是如何工作的呢?

更新: 安装 repository-s3 后,我使用相同的命令并得到它。它应该如何工作?

{
  "error" : {
    "root_cause" : [ {
      "type" : "process_cluster_event_timeout_exception",
      "reason" : "failed to process cluster event (put_repository [my_s3_repository]) within 30s"
    } ],
    "type" : "process_cluster_event_timeout_exception",
    "reason" : "failed to process cluster event (put_repository [my_s3_repository]) within 30s"
  },
  "status" : 503
}

【问题讨论】:

    标签: amazon-web-services elasticsearch amazon-s3


    【解决方案1】:

    您只需要先安装S3 repository plugin

    bin/plugin install repository-s3
    

    然后您可以再次运行命令来创建 S3 存储库。

    【讨论】:

    • bin中没有elasticsearch-plugin文件,所以无法执行该命令。如何安装这个插件?
    • 它对我也不起作用。 bin/plugin: 没有这样的文件或目录
    • 当然你需要 cd 进入你的 ES 安装文件夹 ;-)
    • 您可能还必须将您的 AWS access_keysecret_key 添加到存储库定义中:elastic.co/guide/en/elasticsearch/plugins/5.6/…
    猜你喜欢
    • 2018-06-07
    • 2015-04-17
    • 2020-10-26
    • 2018-04-24
    • 2019-08-26
    • 1970-01-01
    • 1970-01-01
    • 2021-10-25
    • 2023-03-19
    相关资源
    最近更新 更多