elasticsearch 数据导出导入

安装导入导出命令

npm install elasticdump

  

数据导出

./node_modules/elasticdump/bin/elasticdump --input=http://127.0.0.1:9211/myindex --output=./myindex_m.json --type=mapping

./node_modules/elasticdump/bin/elasticdump --input=http://127.0.0.1:9211/myindex --output=./myindex_d.json --type=data

  

将两个文件发送到需要导入的es

 

数据导入

./node_modules/elasticdump/bin/elasticdump --output=http://192.168.0.21:9200/myindex --input=./myindex_m.json --type=mapping

./node_modules/elasticdump/bin/elasticdump --output=http://192.168.0.21:9200/myindex --input=./myindex_d.json --type=data

  

posted @ 2020-07-09 10:39  枯藤老艹树  阅读(1497)  评论(0编辑  收藏  举报