foxyier

[求助]es 数据本地向阿里云 es 迁移问题

  •  
  •   foxyier · Oct 24, 2019 · 10402 views
    This topic created in 2572 days ago, the information mentioned may be changed or developed.
    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 } }

    }
    4 replies  •  2019-10-25 11:14:58 +08:00
    Ehco1996
    Ehco1996
    Oct 24, 2019
    1
    阿里云版的 es 有个 oss 快照备份还原功能

    先在本地把数据存进 oss
    aaronchou0
    aaronchou0
    Oct 24, 2019
    2
    这么点数据 reindex 都可以了。你要嫌慢可以用 elasticdump
    foxyier
    foxyier
    OP
    Oct 24, 2019
    3
    @aaronchou0 用 elasticdump 试了一下。。特别特别慢..有没有什么办法能快一点呢
    aaronchou0
    aaronchou0
    Oct 25, 2019
    4
    @foxyier 26G esdump 2、30 分钟吧,主要看 es 性能。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1487 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 09:47 · PVG 17:47 · LAX 01:47 · JFK 04:47
    ♥ Do have faith in what you're doing.