下载并上传node-v10.15.3-linux-x64.tar.xz
解压
tar fx node-v10.15.3-linux-x64.tar.xz
进入目录
cd node-v10.15.3-linux-x64/bin
建立软链接失败,改为cp
cp node /usr/bin/
cp npm /usr/bin/
安装 elasticdump
/opt/node-v10.15.3-linux-x64/bin/npm install elasticdump -g
导出数据
elasticdump --input http://elastic:xxx4@192.168.0.173:9200/tk-converter-2019.04.18 --output /tmp/converter.json
elasticdump: Import and export tools for elasticsearch
version: 6.0.0
Usage: elasticdump --input SOURCE --output DESTINATION [OPTIONS]
--input
Source location (required)
--input-index
Source index and type
(default: all, example: index/type)
--output
Destination location (required)
--output-index
Destination index and type
(default: all, example: index/type)
--limit
How many objects to move in batch per operation
limit is approximate for file streams
(default: 100)
--size
How many objects to retrieve
(default: -1 -> no limit)
--debug
Display the elasticsearch commands being used
(default: false)
--quiet
Suppress all messages except for errors
(default: false)
--type
What are we exporting?
(default: data, options: [data, settings, analyzer, mapping, alias])
--delete
Delete documents one-by-one from the input as they are
moved. Will not delete the source index
(default: false)
--headers
Add custom headers to Elastisearch requests (helpful when
your Elasticsearch instance sits behind a proxy)
(default: '{"User-Agent": "elasticdump"}')
--params
Add custom parameters to Elastisearch requests uri. Helpful when you for example
want to use elasticsearch preference
(default: null)
-