我尝试使用弹性转储(在Node.js上)备份并将索引恢复到Elasticsearch中的json:
备份
elasticdump --input=http://cred:entials@myserver.com:9200/.kibana --output=kibana.json --type=data (作品)
恢复
elasticdump --output=http://cred:entials@myserver.com:9200/.kibana --input=kibana.json --type=data (给出一个错误)
错误是:
_stream_readable.js:749
throw new Error('Cannot switch to old mode now.');
^
Error: Cannot switch to old mode now.
at emitDataEvents (_stream_readable.js:749:11)
at ReadStream.Readable.pause (_stream_readable.js:740:3)
at file.completeBatch (/usr/lib/node_modules/elasticdump/lib/transports/file.js:75:19)
at Stream.<anonymous> (/usr/lib/node_modules/elasticdump/lib/transports/file.js:65:10)
at Stream.emit (events.js:117:20)
at drain (/usr/lib/node_modules/elasticdump/node_modules/through/index.js:34:23)有人知道发生了什么以及如何解决吗?
发布于 2016-03-09 05:29:58
您的节点版本已经过时。
尝试运行node --version,如果得到1.0.0以下的任何内容,则需要升级本地节点版本。
为了在本地管理多个节点版本,可以使用 module。只需运行以下步骤
sudo npm install -g n
sudo n stable然后,您将安装最新版本的节点,弹性转储将再次工作。
https://stackoverflow.com/questions/35883366
复制相似问题