美文网首页
ES 复制数据到另外一个集群

ES 复制数据到另外一个集群

作者: gruan | 来源:发表于2020-04-09 17:14 被阅读0次

Post

http://<new cluster server>:<port>/_reindex

{
  "source": {
    "remote": {
      "host": "http://<source cluster server>:<port>/",
      "username": "源集群用户名",
      "password": "源集群密码"
    },
    "index": "源 index",
    "query": {
      "match_all": {}
    }
  },
  "dest": {
    "index": "目的 index"
  }
}

如果源群集开启了 xpack.security , 需要添加 basic 认证信息到请求头:

Authorization:Basic <用户名:密码 的 base64 字符串>

需要在目的集群中启用reindex白名单, 在目标集群的配置中添加如下配置:

reindex.remote.whitelist: http://<source cluster server>:<port> 

相关文章

网友评论

      本文标题:ES 复制数据到另外一个集群

      本文链接:https://www.haomeiwen.com/subject/xclzphtx.html