Export indice from elasticsearch 1.6 to 2.1.1


I'm trying to snapshot an elasticsearch 1.6 to restore the indice on a brand new elasticsearch 2.1.1

The snapshot on the elasticsearch 1.6 seems ok, I can see that with a Get

"snapshots" : [ {
"snapshot" : "kibana_20160212",
"version_id" : 1060099,
"version" : "1.6.0",
"indices" : [ ".kibana" ],
"state" : "SUCCESS",
"start_time" : "2016-02-12T14:56:54.308Z",
"start_time_in_millis" : 1455289014308,
"end_time" : "2016-02-12T14:56:54.694Z",
"end_time_in_millis" : 1455289014694,
"duration_in_millis" : 386,
"failures" : ,
"shards" : {
"total" : 1,
"failed" : 0,
"successful" : 1
} ]

And when I try to make the restore on the new elasticsearch 2.1.1 I have this message.

{"error":{"root_cause":[{"type":"illegal_state_exception","reason":"No state match for [SUCCESS]"}],"type":"illegal_state_exception","reason":"No state match for [SUCCESS]"},"status":500}

Is it a compatibility problem ? Can I "convert" data, or other thing ?

Thanks for your help

What is the restore command you are calling, can you replicate the entire thing?

To restore I used

curl -XPOST 'http://localhost:9200/_snapshot/my_backup/kibana_20160212/_restore'

And in the /var/lib/elasticsearch/my_backup/ I have transfered metada and data files

It's not the same format of naming as in the new version of elasticsearch, but if I change I have an error.

And to make the snapshot on the old elasticsearch I have used

curl -s -XPUT 'http://localhost:9200/_snapshot/my_backup/kibana_20160212'' -d '
"indices": ".kibana",
"ignore_unavailable": "true",
"include_global_state": false

What do you mean by this, transferred from where?

In fact the snapshot command on the old elasticsearch 1.6 make two files

And I have transfered those two files on the new elasticsearch 2.1.1 into the /var/lib/elasticsearch/my_backup/ to make the restore.

Any idea ?

Is it possible to migrate from 1.6 to 2.1.1 ? or what I try to do is not possible or too complicated ?

Ideally you should just mount the dit which contains all snapshot files on the new machine. Then run the restore.

That being said, are you 100% sure your data are compatible with elasticsearch 2.x?
Did you first try the migration plugin?

How many nodes do you have BTW?

Ok thank you, I understand the best practice to use the snapshot.

Hum no I don't know if data from elasticsearch 1.6 are compatible with the 2.x.

I didn't test yet the migration plugin, is it that plugin elasticsearch-migration ?

I have 3 nodes on the "old" infra using elasticsearch 1.6 and 4 nodes on the new one.

Thanks again for your help and your time.

Yes, you should definitely run this before upgrading.