如何从部署在Linux服务器上的远程弹性服务器导出所有文档(30万个文档),并将这些文档导入到部署在windows.I上的本地服务器。我想在本地服务器上复制存在于远程服务器上的相同环境。
发布于 2015-12-21 19:54:05
我建议使用Logstash来实现这一点,使用下面的配置。确保替换源主机和目标主机,以及索引和类型名称,以匹配您的本地环境。
文件: copy.conf
input {
elasticsearch {
hosts => "linux_host:9200" <---- your remote Linux host
index => "index_to_copy"
}
}
filter {
mutate {
remove_field => [ "@version", "@timestamp" ]
}
}
output {
elasticsearch {
host => "localhost" <--- your local Windows host
port => 9200
protocol => "http"
manage_template => false
index => "index_to_copy"
}
}然后,您可以简单地使用以下命令启动它
bin/logstash -f copy.conf另一种可能是使用snapshot & restore功能。
https://stackoverflow.com/questions/34394255
复制相似问题