RT
现在有需求把本地 elasticsearch 的一个索引(26G 的数据,接近 300W 数据)迁移到阿里云的 elasticsearch 中, 但是使用 logstash 只能迁移 1W 条数据, 请问如何把索引中的所有数据都迁移过去?
logstash 配置文件:
input {
elasticsearch {
hosts => ["1.1.1.1:9200"] #老 ES 集群访问地址
index => "book_2019-10" #需要同步的索引名称
size => 10000
scroll => "1m"
codec => "json"
docinfo => true
}
}
output {
elasticsearch {
hosts => ["2.2.2.2:9200"] #阿里云 ES 访问地址
user => "elastic" #默认为 elastic
password => "123456789" #购买阿里云 ES 界面中指定的密码,或初始化 Kibana 时指定的密码
index => "book_2019-10" #在新 ES 集群中的索引名
document_type => "%{[@metadata][_type]}"
document_id => "%{[@metadata][_id]}"
template => "/logstash/template/book.json"
template_name => "book*"
template_overwrite => true
doc_as_upsert => true
}
stdout { codec => rubydebug { metadata => true } }
}
现在有需求把本地 elasticsearch 的一个索引(26G 的数据,接近 300W 数据)迁移到阿里云的 elasticsearch 中, 但是使用 logstash 只能迁移 1W 条数据, 请问如何把索引中的所有数据都迁移过去?
logstash 配置文件:
input {
elasticsearch {
hosts => ["1.1.1.1:9200"] #老 ES 集群访问地址
index => "book_2019-10" #需要同步的索引名称
size => 10000
scroll => "1m"
codec => "json"
docinfo => true
}
}
output {
elasticsearch {
hosts => ["2.2.2.2:9200"] #阿里云 ES 访问地址
user => "elastic" #默认为 elastic
password => "123456789" #购买阿里云 ES 界面中指定的密码,或初始化 Kibana 时指定的密码
index => "book_2019-10" #在新 ES 集群中的索引名
document_type => "%{[@metadata][_type]}"
document_id => "%{[@metadata][_id]}"
template => "/logstash/template/book.json"
template_name => "book*"
template_overwrite => true
doc_as_upsert => true
}
stdout { codec => rubydebug { metadata => true } }
}
