# Migrating data off of ES 0.90.3 and into ES 1.7.x

**URL:** <https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471>\
**Category:** Elasticsearch\
**Created:** [November 24, 2015, 4:31pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471 "2015-11-24T16:31:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rysiek](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rysiek](https://discuss.elastic.co/u/rysiek)\
**Post date:** [November 24, 2015, 4:31pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/1 "2015-11-24T16:31:54Z")

</div>

I have found myself in an uncomfortable spot where I have to migrate data off of ES 0.90.3 (I have no access to the server itself, just to the data) and into a different ES 1.7.x (here I have full access).

So far I have tried two approaches:

- elasticdump (did not work, as it requires ES 1.2 at least)
- [logstash](http://stackoverflow.com/a/26295832), which gives me [this error](https://tech.occrp.org/etherpad/p/r.82929a3a330dc2ab0bffaad91b7a7da3):

> A plugin had an unrecoverable error. Will restart this plugin.  
> Plugin: \<LogStash::Inputs::Elasticsearch hosts=\>["some\_host:9200"], index=\>"id\_prod", query=\>"\*", codec=\>\<LogStash::Codecs::JSON charset=\>"UTF-8"\>, scan=\>true, size=\>1000, scroll=\>"1m", docinfo=\>false, docinfo\_target=\>"@metadata", docinfo\_fields=\>["\_index", "\_type", "\_id"], ssl=\>false\>  
> Error: [400] {  
> "error":"SearchPhaseExecutionException[Failed to execute phase [init\_scan], all shards failed; shardFailures {  
> [i22flp\_3TGWYPYsOkCG5OA][id\_prod][0]: SearchParseException[[id\_prod][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested:  
> ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@2a];  
> }{  
> [i22flp\_3TGWYPYsOkCG5OA][id\_prod][2]: SearchParseException[[id\_prod][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested:  
> ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@2a];  
> }{  
> [i22flp\_3TGWYPYsOkCG5OA][id\_prod][1]: SearchParseException[[id\_prod][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested:  
> ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@2a];  
> }{  
> [i22flp\_3TGWYPYsOkCG5OA][id\_prod][4]: SearchParseException[[id\_prod][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested:  
> ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@2a];  
> }{  
> [i22flp\_3TGWYPYsOkCG5OA][id\_prod][3]: SearchParseException[[id\_prod][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested:  
> ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@2a]; }]",  
> "status":400} {:level=\>:error}

I have verified that this is related to the _source_ server (removed `elasticsearch` output from `logstash` config, leaving just `stdout` for testing). I have no idea what's going on there and the only thing I have found on the Internets is related to... [the number of spaces in the data part of a query](https://github.com/elastic/elasticsearch/issues/8595).

Any help much appreciated!

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [November 24, 2015, 5:31pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/2 "2015-11-24T17:31:00Z")

</div>

When you say you have access to the old data, do you mean the physical data itself (e.g. the data directory)?

I think the first thing I would try is to rsync that over to your new server's data directory, then try to start ES 1.7 and allow it to import the "dangling indices". I don't quite remember, but I don't think the underlying Lucene version has changed enough in that period of time to drop bwc for 0.90.

It'd be worth a try anyway, if you have the raw data directory.

Otherwise, I'm not sure. Make sure you are using the HTTP output for Elasticsearch (not the Java version, which uses the transport client and requires identical ES versions on LS + ES). The logstash folks in the logstash forum and/or #logstash IRC might be able to help more.

Worst case, you could always write a script to dump from one cluster to the other. The Python client for example has a [Reindex Helper](https://elasticsearch-py.readthedocs.org/en/master/helpers.html#reindex), which will execute a scan/scroll and reindex into a new index (or new cluster). You could also write something similar in your language of choice. Not ideal, but it'd be an effective option.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 24, 2015, 8:00pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/3 "2015-11-24T20:00:43Z")

</div>

Do yo have access to the 0.90 cluster with a transport client?

---

<div class="post-metadata">

**Author:** ![rysiek](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rysiek](https://discuss.elastic.co/u/rysiek)\
**Post date:** [November 24, 2015, 10:40pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/4 "2015-11-24T22:40:56Z")

</div>

> [@polyfractal](#):
>
> When you say you have access to the old data, do you mean the physical data itself (e.g. the data directory)?

No, only via HTTP.

> [@jprante](#):
>
> Do yo have access to the 0.90 cluster with a transport client?

How can I check this?

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 24, 2015, 11:10pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/5 "2015-11-24T23:10:59Z")

</div>

@rysiek can you use the port 9300, or the port that has been configured for internal cluster transport protocol?

---

<div class="post-metadata">

**Author:** ![rysiek](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rysiek](https://discuss.elastic.co/u/rysiek)\
**Post date:** [November 25, 2015, 10:20am UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/6 "2015-11-25T10:20:49Z")

</div>

Yes, I seem to be able to connect to port `9300` on that server. I think I can safely assume, based on the history of that host, that ES has not been configured to use a different port for this.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 25, 2015, 11:14pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/7 "2015-11-25T23:14:18Z")

</div>

I have released 0.90.11.5 of my knapsack export/import plugin which is a transport client using scan/scroll query to fill compressed archives

> **[jprante/elasticsearch-knapsack](https://github.com/jprante/elasticsearch-knapsack/)**
>
> elasticsearch-knapsack - Knapsack plugin is an import/export tool for Elasticsearch

[http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-knapsack/0.90.11.5/](http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-knapsack/0.90.11.5/)

I hope it works with 0.90.3

If you are lucky, you can export your documents into a compressed archive file, and import it later with another knapsack version into a more recent ES version like 1.7

---

<div class="post-metadata">

**Author:** ![rysiek](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rysiek](https://discuss.elastic.co/u/rysiek)\
**Post date:** [November 26, 2015, 4:28pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/8 "2015-11-26T16:28:34Z")

</div>

> [@jprante](#):
>
> I have released 0.90.11.5 of my knapsack export/import plugin

And how do I install said plugin if I do not have access to the source server?..

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 27, 2015, 6:47am UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/9 "2015-11-27T06:47:29Z")

</div>

You just ramp up a new node with the plugin, this new node connects to port 9300. You said the port is open.

---

<div class="post-metadata">

**Author:** ![rysiek](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rysiek](https://discuss.elastic.co/u/rysiek)\
**Post date:** [November 30, 2015, 3:07pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/10 "2015-11-30T15:07:57Z")

</div>

Okay, solved. What we did was:

- ramp up a new `0.90.3` node that we control
- cluster it with the source node
- wait till we get all the data
- un-cluster it
- upgrade the new node to the version of ES we run in production
- use `elasticdump` to shunt data between the new node and the production cluster.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/migrating-data-off-of-es-0-90-3-and-into-es-1-7-x/35471/11 "2017-07-05T23:34:49Z")

</div>


