7

如何获取文件的弹性搜索索引,然后将该数据插入另一个集群?我想将数据从一个集群移动到另一个集群,但我无法直接连接它们。

4

3 回答 3

2

如果您不需要保持 _id 相同并且唯一重要的一点是 _source,您可以将 logstash 与配置一起使用:

input { //from one cluster } output { //to another cluster }

这里有更多信息:http ://www.logstash.net/docs/1.4.2/

是的,它的方法很奇怪,但是我尝试将它用于按索引在集群之间进行即时数据传输,并且它很有魅力(当然,如果您不需要保留由 elasticsearch 生成的 _id)

于 2014-10-10T09:12:00.413 回答
1

There is script which will help you to backup and restore indices from one cluster to another. i didn't tested this but may be it will fix your needs. check this Backup and restore an Elastic search index

And you can also use perl script to copy index from one cluster to another (or the same cluster).

check this link clintongormley/ElasticSearch.pm

于 2013-08-19T18:20:43.500 回答
0

我最近尝试过解决这个问题,有几种方法可以帮助你。

  1. 使用 Elasticsearch 的快照和恢复 API。您可以在源集群上拍摄快照,并使用该快照将数据恢复到目标集群。

  2. 如果您的设置允许安装外部包,您也可以使用Elasticdump

于 2021-05-11T02:22:13.463 回答