安装

1) yum install epel-release    

2) yum install nodejs  

3) yum install nodejs npm  

4) npm install elasticdump  

5) cd node_modules/elasticdump/bin  

6)./elasticdump  --input=http://192.168.1.1:9200/original --output=http://192.168.1.2:9200/newCopy --type=data  

  

不一样的地方就是--type=mapping ,意思是把原始索引的mapping结构迁移给目标索引。然后在执行--type=data的6)就可以把数据迁移过去啦

 如果索引很多,你还是懒得一个个去迁移,那么你可以改用这个命令:

./elasticdump  --input=http://192.168.1.1:9200/ --output=http://192.168.1.2:9200/ --all=true  

加个--all=true,input与output里不需要把索引名加上,这样就可以自动把原机器上的所有索引迁移到目标机器

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-01-17
  • 2022-01-19
猜你喜欢
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-06-02
  • 2022-12-23
  • 2021-08-10
相关资源
相似解决方案