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

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM