Selective snapshot recovery not behaving as expected [ES 1.4.4]


(Olivier Van Dam) #1

Hi,

I've been trying to restore a specific series of indices from snapshot, and the behavior isn't as expected:

  1. the target snapshot contains a series of indices, alpha-2016.01.01, alpha-2016. ... , beta-2016.01.01, ... gamma-2016.01.01, ..., delta-2016.01.01, ...
    I wish to restore the beta, gamma and delta indices while not touching the alpha indices.
    Reason: the alpha indices are about 10 times te size of the other ones, and would consume too much resource, as well as slow down the restoration process quite a lot.
    The snapshot contains about 20 indices (so days) for each index type, and I do not wish to restore all of the

Basing myself on documentation available here - the ElasticSearch version we're using is the 1.4.4: https://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html

I've built up the following command:

curl -XPOST 'http://localhost:9200/_snapshot/arch/archive-01/_restore' -d '
{
"indices": "beta-2016.01.13, gamma-2016.01.13, delta-2016.01.13",
"ignore_unavailable": "true",
"include_global_state": false
}'

Doing so got a very unexpected behavior: the restore request was accepted, but started restoring alpha-2016.01.13

Additional attempts seem to indicate that any request not clearly understood by the system and containing "indices" information will trigger the first indice in the snapshot (at least this is my current assumption.

The only work around I have that works is to perform the indice selection one by one:

curl -XPOST 'http://localhost:9200/_snapshot/arch/archive-01/_restore' -d '
{
"indices": "beta-2016.01.13",
"ignore_unavailable": "true",
"include_global_state": false
}'

As stated above, it works, but you can understand this makes the restoration process a lot more painful than it should be.

Any help on the topic would be greatly appreciated.


(system) #2