亲,只收二进制
esm

esm

Elasticsearch 迁移工具 ESM 更新 0.4.4

资料分享medcl 发表了文章 • 10 个评论 • 7643 次浏览 • 2020-05-14 16:07 • 来自相关话题

timg.jpeg
 ESM 0.4.4 修复一堆 bug,支持几个新的特性:
  • 可用于生成测试数据,一般用于压力测试,基于源 ES 或者导入到本地的 JSON 数据,随机修改 ID,可以指定重复次数
  • 修复 Routing 参数在不同 ES 版本下的参数差异,支持 1.x\2.x\3.x\5.x 到 6.x\7.x 的相互导入
  • 修复终端下不能切换到后台执行的 bug,可以以 crontab 定时执行
  • 支持指定 _source 字段导出
  • 支持 _source 字段重命名
  • 支持文档 _type 重命名
  下载地址:   https://github.com/medcl/esm/releases/tag/v0.4.4     生成测试数据示例:   1.直接以来源 es 的 my_index1 的索引数据生成到目标 es 集群的索引 my_index2,产生 10 份一样的数据
./bin/esm -s http://localhost:9201 -d http://localhost:9200 -x my_index1 -y 
my_index2
 -n elastic:pass  --regenerate_id  --repeat_times=10
2.先导出索引文档到本地的文件 dump.json
./bin/esm -s http://localhost:9201 -x my_index1 -o dump.json
再基于这份样本,生成 10 份一样的数据到目标集群
./bin/esm -i dunp.json -d  http://localhost:9201 -y target-index1  --regenerate_id  --repeat_times=10 

更多使用示例参照项目 README

发布个es迁移工具:elasticsearch-migration

Elasticsearchmedcl 发表了文章 • 135 个评论 • 31670 次浏览 • 2016-05-23 17:09 • 来自相关话题

https://github.com/medcl/elasticsearch-migration 支持多个版本间的数据迁移,使用scroll+bulk 1.版本支持1.x,2.x.5.0 (0.x未测试) 2.支持http basic auth 认证的es集群 3.支持导入覆盖索引名称(目前只支持单个索引导入的情况下可指定) 4.支持index setting和mapping的同步(相关es大版本,2.x和5.0之间不支持) 5.支持dump到本地文件 6.支持从dump文件加载导入到指定索引   欢迎测试!  
#copy index index_name from 192.168.1.x to 192.168.1.y:9200
./bin/esm  -s http://192.168.1.x:9200   -d http://192.168.1.y:9200 -x index_name  -w=5 -b=10 -c 10000

#copy index src_index from 192.168.1.x to 192.168.1.y:9200 and save with dest_index
./bin/esm -s http://localhost:9200 -d http://localhost:9200 -x src_index -y dest_index -w=5 -b=100

#support Basic-Auth
./bin/esm -s http://localhost:9200/ -x "src_index" -y "dest_index"  -d http://localhost:9201 -n admin:111111

#copy settings and override shard size
./bin/esm -s http://localhost:9200/ -x "src_index" -y "dest_index"  -d http://localhost:9201 -m admin:111111 -c 10000 --shards=50  --copy_settings 

#copy settings and mapping, recreate target index, add query to source fetch, refresh after migration
./bin/esm -s http://localhost:9200/ -x "src_index" -q=query:phone -y "dest_index"  -d http://localhost:9201  -c 10000 --shards=5  --copy_settings --copy_mapping --force  --refresh

#dump elasticsearch documents into local file
./bin/esm -s http://localhost:9200 -x "src_index"  -m admin:111111 -c 5000 -b -q=query:mixer  --refresh -o=dump.bin 

#loading data from dump files, bulk insert to another es instance
./bin/esm -d http://localhost:9200 -y "dest_index"   -n admin:111111 -c 5000 -b 5 --refresh -i=dump.bin
 

Elasticsearch 迁移工具 ESM 更新 0.4.4

资料分享medcl 发表了文章 • 10 个评论 • 7643 次浏览 • 2020-05-14 16:07 • 来自相关话题

timg.jpeg
 ESM 0.4.4 修复一堆 bug,支持几个新的特性:
  • 可用于生成测试数据,一般用于压力测试,基于源 ES 或者导入到本地的 JSON 数据,随机修改 ID,可以指定重复次数
  • 修复 Routing 参数在不同 ES 版本下的参数差异,支持 1.x\2.x\3.x\5.x 到 6.x\7.x 的相互导入
  • 修复终端下不能切换到后台执行的 bug,可以以 crontab 定时执行
  • 支持指定 _source 字段导出
  • 支持 _source 字段重命名
  • 支持文档 _type 重命名
  下载地址:   https://github.com/medcl/esm/releases/tag/v0.4.4     生成测试数据示例:   1.直接以来源 es 的 my_index1 的索引数据生成到目标 es 集群的索引 my_index2,产生 10 份一样的数据
./bin/esm -s http://localhost:9201 -d http://localhost:9200 -x my_index1 -y 
my_index2
 -n elastic:pass  --regenerate_id  --repeat_times=10
2.先导出索引文档到本地的文件 dump.json
./bin/esm -s http://localhost:9201 -x my_index1 -o dump.json
再基于这份样本,生成 10 份一样的数据到目标集群
./bin/esm -i dunp.json -d  http://localhost:9201 -y target-index1  --regenerate_id  --repeat_times=10 

更多使用示例参照项目 README

发布个es迁移工具:elasticsearch-migration

Elasticsearchmedcl 发表了文章 • 135 个评论 • 31670 次浏览 • 2016-05-23 17:09 • 来自相关话题

https://github.com/medcl/elasticsearch-migration 支持多个版本间的数据迁移,使用scroll+bulk 1.版本支持1.x,2.x.5.0 (0.x未测试) 2.支持http basic auth 认证的es集群 3.支持导入覆盖索引名称(目前只支持单个索引导入的情况下可指定) 4.支持index setting和mapping的同步(相关es大版本,2.x和5.0之间不支持) 5.支持dump到本地文件 6.支持从dump文件加载导入到指定索引   欢迎测试!  
#copy index index_name from 192.168.1.x to 192.168.1.y:9200
./bin/esm  -s http://192.168.1.x:9200   -d http://192.168.1.y:9200 -x index_name  -w=5 -b=10 -c 10000

#copy index src_index from 192.168.1.x to 192.168.1.y:9200 and save with dest_index
./bin/esm -s http://localhost:9200 -d http://localhost:9200 -x src_index -y dest_index -w=5 -b=100

#support Basic-Auth
./bin/esm -s http://localhost:9200/ -x "src_index" -y "dest_index"  -d http://localhost:9201 -n admin:111111

#copy settings and override shard size
./bin/esm -s http://localhost:9200/ -x "src_index" -y "dest_index"  -d http://localhost:9201 -m admin:111111 -c 10000 --shards=50  --copy_settings 

#copy settings and mapping, recreate target index, add query to source fetch, refresh after migration
./bin/esm -s http://localhost:9200/ -x "src_index" -q=query:phone -y "dest_index"  -d http://localhost:9201  -c 10000 --shards=5  --copy_settings --copy_mapping --force  --refresh

#dump elasticsearch documents into local file
./bin/esm -s http://localhost:9200 -x "src_index"  -m admin:111111 -c 5000 -b -q=query:mixer  --refresh -o=dump.bin 

#loading data from dump files, bulk insert to another es instance
./bin/esm -d http://localhost:9200 -y "dest_index"   -n admin:111111 -c 5000 -b 5 --refresh -i=dump.bin