Export ES indices based on time


(Michael Li Zhou) #1

Is there a way to export ES indices from a time range? i.e. 1:00 PM - 2:00PM? I want to be able to export this range and send it another ES instance.


(Magnus B├Ąck) #2

There's no built-in mechanism for this. Unless there's an existing program that can do this (Elasticsearch Knapsack comes to mind) you'll have to write something yourself. It should be quite easy with e.g. elasticsearch-py.


(Mark Harwood) #3

Using the python client there is an efficient "reindex" api[1] that can take a query as criteria to subset the data

[1] https://elasticsearch-py.readthedocs.org/en/master/helpers.html#elasticsearch.helpers.reindex


(Michael Li Zhou) #4

Thank you guys will look into it!


(Mark Walkom) #5

You can also use Logstash for this via this method.
There is also snapshot & restore.


(system) #6