@awsekfozc
2017-08-11T09:32:22.000000Z
字数 754
阅读 1087
Elasticsearch
用于导出导入Elasticsearch数据
./plugin install http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-knapsack/2.3.1.0/elasticsearch-knapsack-2.3.1.0-plugin.zip
curl -XDELETE 192.168.1.63:9200/test
curl -XPUT 192.168.1.63:9200/test/test1/1 -d '{"key":"value 1"}'
curl -XPUT 192.168.1.63:9200/test/test1/2 -d '{"key":"value 2"}'
##第一种
curl -XPOST 192.168.1.63:9200/test/test/_export
结果:{"running":true,"state":{"mode":"export","started":"2015-10-12T18:13:47.214Z","path":"/opt/elasticsearch/logs/test_test.tar.gz","node_name":"Doctor Bong"}}
##第二种
curl -XPOST '192.168.1.63:9200/test/_export?archivepath=/opt/testdata/myarchive.zip'
curl -XPOST '192.168.1.63:9200/test1/_import?path=/opt/elasticsearch-2.3.1/logs/test1.tar.gz'
在此输入正文