全局安装
npm install elasticdump -g
https://github.com/elasticsearch-dump/elasticsearch-dump/issues/52
It’s best to install this from npm with npm install elasticdump (or globally with npm install elasticdump -g). The master branch on github may have some bugs and not yet be released. You can also specific specific versions when installing from npm.
Also, elasticdump is not a dependancy of itself (you can check here https://github.com/taskrabbit/elasticsearch-dump/blob/master/package.json#L15-L19). You may have tried to npm install elasticdump inside of a checked-out or cloned elasticdump project.
简单使用教程
https://www.cnblogs.com/sunfie/p/10165473.html
mac备份时不写路径直接备份索引和数据
备份索引
elasticdump \
--input=http://mall.com:9200/mms \
--output=mms_index_mapping.json \
--type=mapping
压缩备份数据
elasticdump \
--input=http://mall.com:9200/mms \
--output=$ \
| gzip > mms.json.gz