安裝elasticdump
首先安裝nodejs
npm install elasticdump -g
使用dump導(dǎo)出es數(shù)據(jù)到j(luò)son
#導(dǎo)出data
elasticdump --input=http://host:9200/draft_eum_210000000000_1_1_7_5 --output=./draft_eum_210000000000_1_1_7_5.json --type=data
#導(dǎo)出mapping
elasticdump --input=http://host:9200/draft_eum_210000000000_1_1_7_5 --output=./draft_eum_210000000000_1_1_7_5.json --type=mapping
使用dump導(dǎo)入es數(shù)據(jù)
elasticdump --input=new_field_34_1_1_5_1.jsonl --output=http://host:9201/eum_340000000000_1_1_5_1