【问题标题】:Can I define a snapshot repository in the configuration YAML?我可以在配置 YAML 中定义快照存储库吗?
【发布时间】:2015-07-31 07:04:48
【问题描述】:

我需要让 Elastic Search 对 Amazon S3 的索引进行快照和恢复。

包含 S3 存储库 states 的 elasticsearch-cloud-aws 插件的文档:

S3 存储库使用 S3 存储快照。可以使用以下命令创建 S3 存储库:

$ curl -XPUT 'http://localhost:9200/_snapshot/my_s3_repository -d '{
    "type": "s3",
    "settings": {
        "bucket": "my_bucket_name",
        "region": "us-west"
    }
}'

我不了解存储库的概念。不应该在 YAML 配置文件中定义存储库吗?我们正在自动化 Elastic Search 的安装和配置,我们希望每个集群都有一个使用给定名称定义的 S3 存储库。

我是否必须将此 PUT 作为我的 Elastic Search 集群配置的一部分发送,或者是否有办法在 Elastic Search 的 YAML 配置文件中定义此配置?

(EC2 上的 CentOS 7 和 Elastic Search 1.7.0)

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    我认为您自己链接了答案..

    在页面底部states 你有一个例子。重要的部分似乎是

    repositories:
        s3:
            bucket: "bucket_name"
            region: "us-west-2"
    

    把它放在你的 elasticsearch.yml 中应该可以工作(你我还没有测试过)。

    【讨论】:

      猜你喜欢
      • 2021-04-23
      • 2010-12-13
      • 2017-10-17
      • 1970-01-01
      • 2015-06-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多