-
2021-07-01 11:27:11
为什么要进行数据迁移,常用场景:
新建索引gulimall_product
,因为老索引product
的映射规则的 attrs属性类型是doc_value=false
,代表不可以进行aggs聚合
操作,要想实现聚合操作,必须新建索引规则,doc_value=true默认为true,然后将老索引中的数据迁移到新索引中即可1、新建索引映射规则
PUT gulimall_product { "mappings": { "properties": { "attrs": { "type": "nested", "properties": { "attrId": { "type": "long" }, "attrName": { "type": "keyword" }, "attrValue": { "type": "keyword" } } }, "brandId": { "type": "long" }, "brandImg": { "type": "keyword" }, "brandName": { "type": "keyword" }, "catalogId": { "type": "long" }, "catalogName": { "type": "keyword" }, "catelogId": { "type": "long" }, "hasStock": { "type": "boolean" }, "hosStock": { "type": "boolean" }, "hotScore": { "type": "long" }, "saleCount": { "type": "long" }, "skuId": { "type": "long" }, "skuImg": { "type": "keyword" }, "skuPrice": { "type": "keyword" }, "skuTitle": { "type": "text", "analyzer": "ik_smart" }, "spuId": { "type": "long" } } } }
2、数据迁移
将旧索引product的数据迁移到新索引中
POST _reindex { "source": { "index": "product" }, "dest": { "index": "gulimall_product" } }
3、查询新索引
#新索引中已迁移了老索引中的数据 #GET gulimall_product/_search { "took" : 0, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "skipped" : 0, "failed" : 0 }, "hits" : {<-->} }
更多相关内容 -
esm:Elasticsearch迁移工具
2021-02-06 07:52:03Elasticsearch跨版本数据迁移。 特征: 支持跨版本迁移 覆盖索引名称 复制索引设置和映射 支持http基本认证 支持转储到本地文件的索引 支持从本地文件加载索引 支持http代理 支持切片滚动(elasticsearch 5.0 +) ... -
elasticsearch数据迁移
2020-11-24 15:09:21方法二: 先备份数据 然后将备份数据拷贝到新的es集群 再恢复数据 1.在老的es服务器备份数据 (1)创建es备份仓库 $ curl -u elastic:yourpass -XPOST '172.16.2.99:9200/_snapshot/hsbc_backup' -H 'Content-Type: ...方法一: 将data整个目录拷贝到新的es集群即可
方法二: 先备份数据 然后将备份数据拷贝到新的es集群 再恢复数据
1.在老的es服务器备份数据
(1)创建es备份仓库$ curl -u elastic:yourpass -XPOST '172.16.2.99:9200/_snapshot/hsbc_backup' -H 'Content-Type: application/json' -d '{ "type": "fs", "settings": { "location": "/alidata1/admin/backup/elasticsearch/", "compress": true, "chunk_size": "1g", "max_snapshot_bytes_per_sec": "50m", "max_restore_bytes_per_sec": "50m"}}'
(2)获取要备份的索引
$ curl -u elastic:yourpass -XGET http://172.16.2.99:9200/_cat/indices?v |awk '{print $3}'
(3)备份数据,注意.security-6不需要备份curl -u elastic:yourpass -H "Content-Type: application/json" -XPUT http://172.16.2.99:9200/_snapshot/hsbc_backup/es_20200808_1 -d '{"indices": "search_hq_xman_msg,search_hq_xman_mengwang_up,search_hq_xman_mail_send,hq_xman_webchat_send,search_hq_xman_wechatcustome_send,adm_hq_user_insur_and_insured_info_label_20200304,adm_hq_user_info_label_20200304,search_hq_xman_apppush_send,search_hq_xman_webchat_send,adm_hq_user_info_all_label_20200304,search_hq_xman_wechatmp_send,search_hq_xman_mengwang_msg_history,search_hq_xman_mengwang_msg,mapindex,search_hq_xman_wechatgroup_send"}'
2.将备份文件打包压缩 发送到要恢复的es的repo.path指定的目录下
3.将数据恢复到新的es
(1)创建和原来es一样的备份仓库$ curl -u elastic:123456 -XPOST '192.168.43.104:9200/_snapshot/hsbc_backup' -H 'Content-Type: application/json' -d '{ "type": "fs", "settings": { "location": "/alidata1/admin/backup/elasticsearch/", "compress": true, "chunk_size": "1g", "max_snapshot_bytes_per_sec": "50m", "max_restore_bytes_per_sec": "50m"}}'
(2)查看下当前索引
(3)数据恢复
$ curl -u elastic:123456 -XPOST 'http://192.168.43.104:9200/_snapshot/hsbc_backup/es_20200808_1/_restore' -H 'Content-Type: application/json' -d'{ "ignore_unavailable": true, "include_global_state": false }'
(4)查看索引
-
Elasticsearch ES数据迁移方法及注意事项
2020-08-30 22:13:19Elastic数据迁移方法及注意事项 需求 ES集群Cluster_A里的数据(某个索引或某几个索引),需要迁移到另外一个ES集群Cluster_B中。 环境 Linux:Centos7 / Centos6.5/ Centos6.4 Elastic:5.2.0 总结的方法 ...Elastic数据迁移方法及注意事项
需求
ES集群Cluster_A里的数据(某个索引或某几个索引),需要迁移到另外一个ES集群Cluster_B中。
环境
Linux:Centos7 / Centos6.5/ Centos6.4
Elastic:5.2.0总结的方法
-
查询并导出数据
-
拷贝ES物理目录/文件
-
ES快照数据备份和恢复
迁移方法
分别进行以上方法的详细介绍:
查询并导出数据
理论
通过ES提供的查询API,写各种程序,把数据导出csv,或者把数据查询出来,直接入库到新的ES集群中。
实践
#coding=utf-8 import os import sys import pyes index_list = [ ["index_A", "type_A"], ["index_B", "type_B"], ["index_C", "type_C"], ] ES_URL = "http://192.168.1.1:9200/" NEW_ES_URL = "http://192.168.2.1:8200/" def main(): for _index, _type in index_list: conn = pyes.es.ES(ES_URL) search = pyes.query.MatchAllQuery().search(bulk_read=10000) hits = conn.search(search, _index, _type, scan=True, scroll="30m", model=lambda _,hit: hit) conn2 = pyes.es.ES(NEW_ES_URL) count = 0 for hit in hits: conn2.index(hit['_source'], _index, _type, hit['_id'], bulk=True) count += 1 if count % 10000 == 0: print count conn2.flush() conn2.flush() conn2 = None conn = None if __name__ == '__main__': main()
注意事项
-
需要安装python的pyes模块,注意pyes的版本,此处的版本为:pyes.0.20.1
-
用了查询ES的scroll方式,也有一种直接通过ES的DSL查询语句用分页from和size查询,但是ES的分页查询到了千万级别之后,from就会慢的出奇,甚至报错,不信的同学去尝试吧,等着功亏一篑….
-
客户现场的数据级别是物理存储大概在5T(一个副本),条数大概1百亿。现场使用该方法亲测之后,未解决ES迁移的问题。pyes在约到后面查询越慢,最后ES报错…..
总结
- 百万、千万级别条数的数据,可以尝试该方法。
拷贝ES物理目录/文件
理论
ES的文件存在磁盘中,把物理文件一模一样拷贝一份到新的集群环境中,达到数据迁移的效果。
实践
1. 找到ES的存储目录,一般可以到elasticsearch.yml中找到path.data的配置 2. 集群下一般会有多个节点,所以ES的存储目录也就有多个 3. 一般ES的存储目录下,会存储一个集群名字一样的文件夹,需要拷贝的就是这个文件夹. 4. 环境如下: 旧集群: 集群名字:Cluster_A 分片数:6 机器A:一个节点 192.168.1.1 node0 数据存储目录:/opt/data1,/opt/data2 机器B:三个节点 192.168.1.2 node1 数据存储目录:/opt/data1,/opt/data2 node2 数据存储目录:/opt/data3,/opt/data4 node3 数据存储目录:/opt/data5,/opt/data6 新的集群: 集群名字:Cluster_A 分片数:6 机器A:一个节点 192.168.2.1 node0 数据存储目录:/opt/data1,/opt/data2 机器B:三个节点 192.168.2.2 node1 数据存储目录:/opt/data1,/opt/data2 node2 数据存储目录:/opt/data3,/opt/data4 node3 数据存储目录:/opt/data5,/opt/data6 5. 迁移代码如下: 新集群机器A:192.168.2.1如下操作 scp –r root@192.168.1.1:/opt/data1/Cluster_A /opt/data1/ scp –r root@192.168.1.1:/opt/data2/Cluster_A /opt/data2/ 新集群机器B:192.168.2.2如下操作 scp –r root@192.168.1.2:/opt/data1/Cluster_A /opt/data1/ scp –r root@192.168.1.2:/opt/data2/Cluster_A /opt/data2/ scp –r root@192.168.1.2:/opt/data3/Cluster_A /opt/data3/ scp –r root@192.168.1.2:/opt/data4/Cluster_A /opt/data4/ scp –r root@192.168.1.2:/opt/data5/Cluster_A /opt/data5/ scp –r root@192.168.1.2:/opt/data6/Cluster_A /opt/data6/
ES快照数据备份和恢复
理论
使用ES官网提供的快照备份方法,将旧集群ES的索引进行备份,拷贝备份出来的所有文件,在新的集群中进行恢复。
官网写的非常简单:先创建仓库(repository),再往仓库里添加一个快照(snapshot),查看备份状态,That’s all。但是实践需要麻烦很多了。
实践
1. 旧的集群备份出来的东西,需要拷贝到新集群机器上。解决两个问题:一是旧集群没有足够的空间存储这些东西;二是反正备份出来都需要拷贝到新的集群中。此处想到一个方法,将新集群机器的目录远程Mount到旧集群机器上。 2. 挂载目录,2.1)和2.2)可以任选一种方式 3. 使用sshfs进行挂载: // 在每台机器上安装sshfs yum install fuse sshfs // 每台机器上创建Mount共享目录 mkdir /opt/backup_es // 旧集群的每台机器上挂载共享目录(分别挂载了新机器的/opt/data07目录到/opt/backup_es) sshfs root@192.168.2.1:/opt/data07 /opt/backup_es -o allow_other sshfs root@192.168.2.2:/opt/data07 /opt/backup_es -o allow_other // 测试运行ES的用户是否有对共享目录的写权限 sudo -u elastic touch /opt/backup_es // 在旧机器上将共享目录的权限付给ES的运行用户 chown elastic:elastic -R /opt/backup_es 2. 使用Mount nfs进行挂载: // 在新集群的机器上(192.168.2.1, 192.168.2.2)添加共享的文件夹和客户端可以访问的IP地址 vi /etc/exports /opt/data07 192.168.1.1(rw,no_root_squash) /opt/data07 192.168.1.2(rw,no_root_squash) // 查看共享文件夹和 exportfs -rv // 重启启动新集群机器的NFS服务 services nfs restart // 旧集群的每台机器上创建共享目录 mkdir /opt/backup_es // 旧集群机器上进行Mount挂载 mount -t nfs 192.168.2.1:/opt/data07 /opt/backup_es mount -t nfs 192.168.2.2:/opt/data07 /opt/backup_es // 在旧机器上将共享目录的权限付给ES的运行用户 chown elastic:elastic -R /opt/backup_es 3. 创建ES仓库 // 创建ES仓库my_backup http://192.168.1.1:9200/_plugin/head/的复合查询,通过PUT进行发送请求: PUT _snapshot/my_backup { "type": "fs", "settings": { "location": "/opt/backup_es", "compress": true } } // 查看仓库的状态 http://192.168.1.1:9200/_snapshot 4. 创建快照备份 // 针对具体的index创建快照备份(可以指定1个快照1个索引,或1个快照多个索引) // 后面会依据快照的名称来进行恢复 http://192.168.1.1:9200/ PUT _snapshot/my_backup/snapshot_name_A { "indices": "index_A, index_B" } 成功之后,备份已经异步开始了。 5. 查看备份的状态 // 查看备份状态 http://192.168.1.1:9200/_snapshot/my_backup/snapshot_name_A/_status 细心的同学会看到ES会同时进行几个分片的备份,而且显示备份的数据情况。 有心的同学会看到,旧集群上共享的两个目录/opt/backup_es会均分备份出来的数据。这一点ES还是比较强大的,赞一个。应该还可以指定多个目录(作者没有试过,但是应该也是OK的,这样就可以挂载多个目录,解决磁盘空间不足的问题了) 6. 最后,就是等,直至所有的的备份都完成。 备份完成后,查看旧集群每台机器的/opt/backup_es目录,查看备份出的东东。 取消挂载 7. 在新集群中恢复 // 在新集群每台机器上将共享目录的权限付给ES的运行用户 chown elastic:elastic -R /opt/data07 // 停止ES,设置elasticsearch.yml的参数 path.repo: /opt/data07 // 启动ES,在新集群创建仓库 http://192.168.2.1:9200/_plugin/head/的复合查询,通过PUT进行发送请求: PUT _snapshot/my_backup { "type": "fs", "settings": { "location": "/opt/data07", "compress": true } } 8. 在新集群中恢复数据 // 使用RESTful API进行备份的恢复 http://192.168.1.1:9200/ POST _snapshot/my_backup/snapshot_name_A/_restore // 查看恢复的状态 http://192.168.1.1:9200/ GET _snapshot/my_backup/snapshot_name_A/_status 9. 等,直至恢复完成。
注意事项
-
索引很大,需要有足够的空间存储备份出来的数据,挂载磁盘和设置path.repo来解决该问题。
-
在简历仓库的时候,会报错,找不到快照目录/opt/backup_es
需要在elasticsearch.yml中设置path.repo: /opt/backup_es -
挂载的磁盘需要赋权限,让ES的用户能读写。Sshfs的时候加上 -oallow_other;Mount的时候需要对目录进行赋权限chown
-
Mount nfs的时候需要注意配置:vi /etc/exports
/opt/data07192.168.1.1(rw,no_root_squash) /opt/data07192.168.1.2(rw,no_root_squash)
-
新集群中如果有索引和备份出来的索引有冲突(索引已存在),恢复不成功。
解决:可以将旧的索引重命名,然后导入新集群中。导入成功后,将两个索引建立一个别名。 -
恢复期间,整个集群会变成红色(集群不可用),最好半夜的时候进行。
-
-
ElasticSearch 数据迁移方案
2022-03-12 17:04:17ㅤㅤㅤ ...ElasticSearch 常用api ElasticSearch 版本说明 { “name”: “node-3”, “cluster_name”: “test-elasticsearch”, “cluster_uuid”: “FM6vTooBTS6cSM9scMEU7g”, “version”: { “nuㅤㅤㅤ
ㅤㅤㅤ
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ(一个人不论赋有什么样的棋,他如果不知道自己有这种棋,并且不形成适合于自己棋的计划,那种棋对他便完全无用。——休漠)
ㅤㅤㅤ
ㅤㅤㅤ
ㅤㅤㅤㅤㅤㅤㅤㅤㅤ
ElasticSearch 常用apiElasticSearch 版本说明
{
“name”: “node-3”,
“cluster_name”: “test-elasticsearch”,
“cluster_uuid”: “FM6vTooBTS6cSM9scMEU7g”,
“version”: {
“number”: “2.4.1”,
“build_hash”: “c67dc32e24162035d18d6fe1e952c4cbcbe79d16”,
“build_timestamp”: “2016-09-27T18:57:55Z”,
“build_snapshot”: false,
“lucene_version”: “5.5.2”
},
“tagline”: “You Know, for Search”
}ElasticSearch 数据迁移方案
ElasticSearch 数据迁移方式
有以下三种方式可以更新索引结构映射和设置
-
更新索引结构设置
因为自定义字段的key是未知的,无法显示的设置在mappings中。所以可以在settings中设置默认的分词器和过滤器等配置 -
更新索引结构映射
因为非自定义字段的key是已知的,可以显示的设置在mappings中 -
索引重建
避免影响旧索引数据,方便回滚,可以通过此方式安全的迁移数据到新索引,业务再使用该新索引即可
es默认滚动批次requests_per_second为1000
更新索引结构设置的数据迁移
优点:不需要数据迁移,直接更新索引设置就可以完成更新
缺点:只能对未设置过的字段进行更新,一次性操作,风险高。如果设置后数据检索等出了问题,就不能回滚了操作步骤
- 先查看目前的索引结构
- 请求示例:GET http://172.21.0.31:9900/business
- 然后通过ElasticSearch接口_close关闭索引
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/8.0/indices-close.html#close-index-api-request
- 请求示例:http://172.21.0.31:9900/business/_close
- 再通过PUT接口更新settings
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/8.0/indices-update-settings.html
- 请求示例:http://172.21.0.31:9900/business/_settings
- 需要注意的是只能对未设置过的字段进行更新,当以上请求发出后,再次更新会抛错,提示无法更新
- 更新完成后,再通过接口启用该索引
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/8.0/indices-open-close.html
- 请求示例:http://172.21.0.31:9900/business/_open
- 重新查看该索引结构,查看更新后的结构
- 请求示例:GET http://172.21.0.31:9900/business
更新索引映射的数据迁移
- 同以上步骤相同,只不过更新是mappings
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/7.11/indices-put-mapping.html
重建索引_reindex,通过ElasticSearch提供的api _reindex接口进行索引数据迁移
优点:不影响旧索引数据,使用新的索引结构,即便出问题,也能够快速回滚到旧索引上
缺点:因为要迁移数据,操作较为麻烦。如果不删除旧数据索引,会额外的占用磁盘空间。业务需要使用新索引,可能需要做代码兼容操作步骤
- 先创建新的索引结构
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/7.5/indices-create-index.html
- 请求示例 POST http://172.21.0.31:9900/business_bak
- 查看刚刚创建的新索引
- 请求示例GET http://172.21.0.31:9900/business_bak
- 需要注意numeric_detection数字转换和date_detection日期转换 ,在es中numeric_detection默认是false,但date_detection默认是开启的,所以我们需要显示的关闭date_detection选项,避免后面因为数据格式不一致导致迁移失败
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html#_customizing_detected_date_formats
- 查看新索引中的数据,因为是刚新建的索引,所以数据是空的
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/8.0/search-search.html
- 请求示例:GET http://172.21.0.31:9900/business_bak/_search
- 使用_reindex接口将索引business的索引数据复制至business_bak
- 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-reindex.html
- 请求示例:POST http://172.21.0.31:9900/_reindex
- 再次查看新索引中的数据,已经和旧索引中的一摸一样了
- 当数据量比较大时,可以使用wait_for_completion=false,指定创建异步任务,请求成功后,es会返回一个任务编号,用于后续查看和取消
- 以测试数据举例
- 请求示例:POST http://172.21.0.31:9900/_reindex?wait_for_completion=false
- 通过接口查看该任务的状态
- 请求示例:GET http://172.21.0.31:9900/_tasks/OfyS4qUGTW2OuA2BL5fYgQ:36133906
- 若数据复制任务发生异常等情况,可以使用_cancel取消
- 请求示例:POST http://172.21.0.31:9900/_tasks/OfyS4qUGTW2OuA2BL5fYgQ:36133906/_cancel
- 再次查看,任务已经消失了
-
-
3 种常用的 Elasticsearch 数据迁移方案
2022-03-23 00:16:56如果准备将自建的 elasticsearch 迁移上云,或者的迁移到其他es集群内,可以根据自己的业务需要选择合适的迁移方案。如果业务可以停服或者可以暂停写操作,可以使用以下几种方式进行数据迁移:COS 快照,即Cloud ... -
ElasticSearch 数据迁移
2021-12-25 10:19:43docker run -d --restart=always -p 9200:9200 -e "discovery.type=single-node" -v /etc/localtime:/etc/localtime:ro -v /opt/elasticsearch/data:/usr/share/elasticsearch/data --name es docker.elastic.co/... -
Elasticsearch 数据迁移方案
2022-03-27 00:11:01elasticsearch-dump 和 logstash 做跨集群数据迁移时,都要求用于执行迁移任务的机器可以同时访问到两个集群,因为网络无法连通的情况下就无法实现迁移。而使用 snapshot 的方式则没有这个限制,因为 snapshot 方式 -
Elasticsearch数据迁移(使用快照)
2020-03-19 18:45:30前言:由于做项目的时候没有进行长期考虑,把es,mysql,api等都部署在同一台服务器上,随着业务的增加,需要将部分服务和存储迁移到其他服务器...找到es配置文件elasticsearch.yml ,在配置文件中添加 path.repo注... -
ES数据迁移
2021-08-25 18:24:29在ES的版本升级,容器迁移等情况下,免不了进行数据迁移,如何不用前代码就实现ES的数据迁移呢: 一、同一集群内,索引间的数据迁移 { "conflicts": "proceed", #跳过异常 "source": { "index": "seo_article... -
Elasticsearch多种方案数据迁移
2022-04-01 11:41:28注意:Elasticsearch同版本数据迁移,只需将数据存储目录的文件拷贝到新集群path,重启es集群,即可自动recovery,迁移效率最快。这种方案需要重新给启动用户赋权限,然后es启动即可。 不同版本可采取以下方案: ... -
Elasticsearch数据迁移工具elasticdump工具
2020-03-05 19:22:261、工具安装 ... #tar xf node-v8.11.2-linux-x64.tar.xz ...#mv node-v8.11.2-linux-x64 /usr/local ...Elasticsearch数据迁移工具elasticdump工具 : https://www.cnblogs.com/sunfie/p/10165473.html -
Elasticsearch数据迁移或者版本升级,如何快速提升迁移效率?
2021-07-06 19:45:001.es数据迁移工具 1.1.ElasticDump简介 1.2.安装ElasticDump 1.3迁移工具使用 1.4如何提供效率? 2.常见问题 2.1elasticdump 报SyntaxError: Unexpected identifier 1.es数据迁移工具 1.1.ElasticDump简介 ... -
elasticsearch数据迁移esm
2020-12-31 17:08:59es同步工具官网:https://github.com/medcl/esm ...depth_1-utm_source=distribute.pc_relevant_t0.none- -
手把手教您完成Elasticsearch数据迁移
2020-06-30 20:32:27本文以阿里云Elasticsearch(简称ES)为例,介绍阿里云Elasticsearch间数据迁移、自建ES数据迁移至阿里云ES和第三方ES迁移至阿里云ES的方案,帮助您根据业务选择合适的场景进行迁移。 单击此处免费试用阿里云Elastic... -
es数据迁移
2021-11-22 11:00:51--dest_auth= basic auth of target elasticsearch instance, ie: user:pass -c, --count= number of documents at a time: ie "size" in the scroll request (10000) --buffer_count= number of buffered ... -
elasticsearch数据迁移到新索引(5.5.3
2022-03-08 19:26:34以下为重建索引流程,只应用于小数据迁移 1.建新索引 PUT /index_record_v1 2.查旧索引mapping GET /index_record/_mapping/type_record 3.设置新索引mapping POST /index_record_v1/type_record/_mapping ... -
Elasticsearch数据迁移
2017-11-03 21:51:07 将旧的数据从一个Elasticsearch集群,迁移到应外一个Elasticsearch集群 将每天或者每月的索引库,合并成一个索引库1、安装插件安装命令:进入到lostash的目录: bin/logstash-plugin install logstash-input-... -
使用ESM做elasticsearch数据迁移
2021-07-05 18:11:11此时数据已经开始忘es中写了。 有两种方案。 1、全量再迁移一次。不需要删除。相同的会覆盖掉。 2、记住时间 使用 -q 命令过滤某端时间的数据进去。 esm -s http://xxx.xxx.xxx.xxx:9200 -q "time字段:... -
Elasticsearch 数据迁移
2021-05-28 15:24:06docker run --rm -ti elasticdump/elasticsearch-dump \ --input=http://10.202.228.28:9200/knowledge_index \ --output=http://10.202.228.8:9201/knowledge_index \ --type=mapping docker run --rm -ti ... -
ES数据迁移记录
2022-01-06 15:26:39开发调试是在windows系统上操作的,将es数据从一个服务器迁移到另外一个服务器 1.迁移前准备 1)环境准备 安装node 2)通过安装node安装 elasticdump 操作命令:npm install elasticdump -g 3)生产源ES和目标ES能...