使用reindex迁移集群
这里记录集群A迁移到集群B,在ES实例B的配置文件中添加配置
reindex.remote.whitelist: ip_A:9200
重启ES服务。
使用B的kibana进行迁移
POST _reindex?wait_for_completion=false
{
"source":{
"index": "indexName",
"remote":{
"host": "http://ip_A:9200"
}
},
"query":{
//匹配条件,这里按需过滤
"match_all":{}
}
},
"dest":{
"index": "newIndexName"
}
通过wait_for_completion=false返回的id可以查看迁移进度,
GET _tasks/task_id