Py学习  »  Elasticsearch

Elasticsearch:如何制作minio s3的快照?

Mohamed • 3 年前 • 1965 次点击  

当我试图为我的s3(本地部署的minio)创建快照时,在elasticsearch docker容器中执行以下命令:

curl -X PUT "localhost:9200/_snapshot/s3_repository/snapshot_1?wait_for_completion=true&pretty"

我得到了以下信息:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_exception",
        "reason" : "[s3_repository] Could not determine repository generation from root blobs"
      }
    ],
    "type" : "repository_exception",
    "reason" : "[s3_repository] Could not determine repository generation from root blobs",
    "caused_by" : {
      "type" : "i_o_exception",
      "reason" : "Exception when listing blobs by prefix [index-]",
      "caused_by" : {
        "type" : "sdk_client_exception",
        "reason" : "Unable to execute HTTP request: my-first-bucket.s3",
        "caused_by" : {
          "type" : "unknown_host_exception",
          "reason" : "my-first-bucket.s3"
        }
      }
    }
  },
  "status" : 500
}

需要帮忙吗?

请注意,我使用以下命令创建了s3_存储库:

curl -XPUT 'http://localhost:9200/_snapshot/s3_repository?verify=false&pretty' -H 'Content-Type: application/json' -d'
{
  "type": "s3",
  "settings": {
    "bucket": "my-first-bucket",
    "endpoint": "http://s3:9000"
  }
}'

注意 s3 在里面 http://s3:9000 是我的系统中服务minio的名称 docker-compose.yml

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/132047
 
1965 次点击  
文章 [ 1 ]  |  最新文章 3 年前
Donatello
Reply   •   1 楼
Donatello    3 年前

这里最可能的问题是,这个bucket不是在MinIO启动时创建的。环境变量 MINIO_DEFAULT_BUCKETS 至少没有MinIO的官方支持。MinIO启动后,您可以尝试确认bucket是否按预期存在。

由于bucket只需要创建一次,所以可以在MinIO启动后通过脚本创建。

请知道你可以在 https://slack.min.io/ 24/7/365. 如果您有商业问题,请联系我们hello@min.io或者在我们的网站上询问专家聊天功能 https://min.io/pricing?action=talk-to-us .