I tried backing up and restoring an index to json in Elasticsearch using elasticdump (on Node.js):
[Backup]
elasticdump --input=http://cred:entials@myserver.com:9200/.kibana --output=kibana.json --type=data
(Works)
[Restore]
elasticdump --output=http://cred:entials@myserver.com:9200/.kibana --input=kibana.json --type=data
(Gives an error)
The error is:
_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)
Does anyone know what is going and how to fix it?