使用ESM做elasticsearch数据迁移
esm github地址。里面有详细介绍。
https://github.com/medcl/esm
由于之前先做了一部分迁移,过了一个星期才正式使用,中间的一星期数据没迁移。此时数据已经开始忘es中写了。
有两种方案。
1、全量再迁移一次。不需要删除。相同的会覆盖掉。
2、记住时间 使用 -q 命令过滤某端时间的数据进去。
esm -s http://xxx.xxx.xxx.xxx:9200 -q "time字段:[1624932000000 TO 1625464800000]" -d http://xxx.xxx.xxx.xxx:9200 -n username:password -x 索引 -w=5 -b=10 -c 10000
忘记时间可以使用第一种。记得大概时间使用第二种即可。
我只记得上周二做了迁移 具体的时间忘记了。从周二早0点开始,到现在所有的数据全部迁移一遍。重复数据会自动覆盖。
命令:官方文档里有这里再贴一遍
-s, --source= source elasticsearch instance, ie: http://localhost:9200-q, --query= query against source elasticsearch instance, filter data before migrate, ie: name:medcl-d, --dest= destination elasticsearch instance, ie: http://localhost:9201-m, --source_auth= basic auth of source elasticsearch instance, ie: user:pass-n, --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 documents in memory (100000)-w, --workers= concurrency number for bulk workers (1)-b, --bulk_size= bulk size in MB (5)-t, --time= scroll time (1m)--sliced_scroll_size= size of sliced scroll, to make it work, the size should be > 1 (1)-f, --force delete destination index before copying-a, --all copy indexes starting with . and _--copy_settings copy index settings from source--copy_mappings copy index mappings from source--shards= set a number of shards on newly created indexes-x, --src_indexes= indexes name to copy,support regex and comma separated list (_all)-y, --dest_index= indexes name to save, allow only one indexname, original indexname will be used if not specified-u, --type_override= override type name--green wait for both hosts cluster status to be green before dump. otherwise yellow is okay-v, --log= setting log level,options:trace,debug,info,warn,error (INFO)-o, --output_file= output documents of source index into local file-i, --input_file= indexing from local dump file--input_file_type= the data type of input file, options: dump, json_line, json_array, log_line (dump)--source_proxy= set proxy to source http connections, ie: http://127.0.0.1:8080--dest_proxy= set proxy to target http connections, ie: http://127.0.0.1:8080--refresh refresh after migration finished--fields= filter source fields, comma separated, ie: col1,col2,col3,...--rename= rename source fields, comma separated, ie: _type:type, name:myname-l, --logstash_endpoint= target logstash tcp endpoint, ie: 127.0.0.1:5055--secured_logstash_endpoint target logstash tcp endpoint was secured by TLS--repeat_times= repeat the data from source N times to dest output, use align with parameter regenerate_id to amplify the data size-r, --regenerate_id regenerate id for documents, this will override the exist document id in data source--compress use gzip to compress traffic-p, --sleep= sleep N seconds after finished a bulk request (-1)
使用ESM做elasticsearch数据迁移相关推荐
- elasticsearch数据迁移
reindex 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html _reindex ...
- 做一次完美的数据迁移
1. 数据迁移概述 数据迁移,是一个非常复杂的过程,不仅仅是将数据从一个地方移动到另一个地方.这里需要考虑业务定义.架构变更.应用改造.数据安全等诸多方面问题.在实际迁移工作中,需要结合企 ...
- Elasticsearch 数据迁移方案
常见的业务上云,自建的ES集群迁移上云ES,则需要迁移数据.如果业务可以停服或者可以暂停写操作(冷数据迁移) 迁移方案 COS 快照,即 Cloud Object Storage logstash e ...
- 你们公司有做过数据迁移吗,行业中常见的数据迁移方案,了解下,每个人技术人必备的技能
互联网金融行业发生了翻天覆地的变化,相对应的金融科技也在不断的更新和迭代,每次有新的软件系统出炉的时候,就是老的软件系统命运终结的开始,老的项目当然不会束手就擒,它也会做最后的挣扎,当你从它身上迁移用 ...
- python做mysql数据迁移_Python中MySQL数据迁移到MongoDB脚本的方法
MongoDB简介 MongoDB 是一个基于分布式文件存储的数据库.由 C++ 语言编写.旨在为 WEB 应用提供可扩展的高性能数据存储解决方案. MongoDB 是一个介于关系数据库和非关系数据库 ...
- 使用java做mysql数据迁移时遇到的两个问题
有个数据迁移的需求,需要将A数据库的数据迁移至数据库B. 我以为直接生成mysqldump脚本再跑一下就行了,但是发现并不行. 问题出在java.lang.Runtime类上. Runtime.exe ...
- elasticsearch数据迁移esm
es同步工具官网:https://github.com/medcl/esm https://blog.csdn.net/wangkai_123456/article/details/93190827? ...
- elasticsearch数据迁移备份还原
需求一:elasticsearch中的数据需要每天备份 需求二:elasticsearch5.2中的数据要迁移到elasticsearch6.5.4中 方案:采用repository-hdfs插件进行 ...
- mysql不停机迁移_不停业务,做mysql数据迁移。
入职小美到家后,发现mysql-data目录存储在20G根目录磁盘,磁盘空间越来越小,这个坑必须填掉.同事要求不停业务做迁移,讨论后方案如下: 方案: 1.使用xtartbackup做mysql的ma ...
最新文章
- 电销机器人价格_供应商电话销售机器人服务为先
- 基于用例点来度量软件规模并管理进度 之一
- 2016年 第07届 蓝桥杯 Java B组 决赛真题详解及小结
- JavaScript与HTML交互——事件
- 吴军:数学,为人生之题解出漂亮的答案
- PLSQL连接ORACLE
- Spring 是如何解决循环依赖的?
- Vue第一部分(1):Vue简介以及第一个示例
- 封装的三级联动及应用
- matlab中将ebn0转snr,EbNo(EbN0)和SNR
- Python风格总结:数据类型
- 2013河北省职称计算机应用能力考试操作题答案,(2013河北省职称计算机应用能力考试操作题步骤详解PPT部分.doc...
- golang学习和使用经验总结
- call 在mysql,在MYSQL上选择CASE和CALL程序
- Linux 字体库复制安装
- 匈牙利算法解决指派问题(java版)
- c语言中dot作用,Unix中的dot命令详解
- 书评与摘抄《经济学原理》
- zynqsd的读写数据_数据存储结构图 - Zynq7000 FPGA的高速信号采集处理平台的设计搭建以及后续拓展...
- Md5扩展攻击的原理和应用