jprante / elasticsearch-knapsack

Knapsack plugin is an import/export tool for Elasticsearch
Apache License 2.0
472 stars 77 forks source link

Trying to import an entire index after export #77

Open AbeHandler opened 9 years ago

AbeHandler commented 9 years ago

Hi. I want to use knapsack to export an entire index and then reimport it. (Across two servers.). The docs show how to export a whole index, but not reimport it.

I created this dummy example and it is not working as expected. I would think it would export and then reimport the index 'test' but at the end of the script there is no index 'test' shown in my elastic search.

What can I do to fix this? Can you update the docs?

curl -XDELETE localhost:9200/test  # delete the index
curl -XPUT localhost:9200/test/test/1 -d '{"key":"value 1"}' # add a doc
curl -XPUT localhost:9200/test/test/2 -d '{"key":"value 2"}' # add another doc
curl -XPOST localhost:9200/test/_export # export to 
curl -XDELETE localhost:9200/test
curl -XPOST localhost:9200/test/_import