# 安裝elasticdump
sudo npm install elasticdump
# 執行
# 切換至安裝目錄
cd node_modules/elasticdump/bin
# ex:將某個index內容輸出為檔案(可直接指定為.json)
./elasticdump --input=[ip]/[index_name] --output=[輸出檔案位置] --type=data
# ex:將某個index的mapping輸出為檔案(可直接指定為.json)
./elasticdump --input=[ip]/[index_name] --output=[輸出檔案位置] --type=mapping
# 如果不指定index_name則會匯出所有index