# The best way to migrate data from 3 indices to new index

**URL:** <https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410>\
**Category:** Elasticsearch\
**Created:** [April 27, 2015, 10:02am UTC](https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410 "2015-04-27T10:02:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tao\_hiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tao_hiko/32/707_2.png) [@tao\_hiko](https://discuss.elastic.co/u/tao_hiko)\
**Post date:** [April 27, 2015, 10:02am UTC](https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410/1 "2015-04-27T10:02:44Z")

</div>

I have similar 3 indices in same cluster and I will create new index for  
support new change.

Anyone please suggest me, How to migrate data from those to the new one  
easily?

Hiko.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 27, 2015, 9:24pm UTC](https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410/2 "2015-04-27T21:24:07Z")

</div>

Use one of the official clients to do it - [Starting with the Elasticsearch Platform and its Solutions | Elastic](http://www.elastic.co/guide/)

On 27 April 2015 at 20:02, tao hiko [taohiko@gmail.com](mailto:taohiko@gmail.com) wrote:

> I have similar 3 indices in same cluster and I will create new index for  
> support new change.
> 
> Anyone please suggest me, How to migrate data from those to the new one  
> easily?
> 
> Hiko.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9bpuxdi6kESRtARGhiNfMxkLKRh63oP64D40bWnoMdJA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9bpuxdi6kESRtARGhiNfMxkLKRh63oP64D40bWnoMdJA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![tao\_hiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tao_hiko/32/707_2.png) [@tao\_hiko](https://discuss.elastic.co/u/tao_hiko)\
**Post date:** [April 30, 2015, 11:09am UTC](https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410/3 "2015-04-30T11:09:05Z")

</div>

Hi Mark,

I'm trying to use javascript to do that by bulk operation but I found some  
issue when source data contain "\" that cannot insert to target index that  
show below error

MapperParsingException[failed to parse [summary]]; nested:  
JsonParseException[Unrecognized character escape 's' (code 115)

The source data contains path on Windows (eg. C:\path) so ES ejects that  
document.

Hiko

On Tuesday, April 28, 2015 at 4:24:40 AM UTC+7, Mark Walkom wrote:

> Use one of the official clients to do it - [Starting with the Elasticsearch Platform and its Solutions | Elastic](http://www.elastic.co/guide/)
> 
> On 27 April 2015 at 20:02, tao hiko \<[tao...@gmail.com](mailto:tao...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > I have similar 3 indices in same cluster and I will create new index for  
> > support new change.
> > 
> > Anyone please suggest me, How to migrate data from those to the new one  
> > easily?
> > 
> > Hiko.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/61d15631-a6a5-47e3-9759-25c052a0443a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/61d15631-a6a5-47e3-9759-25c052a0443a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![tao\_hiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tao_hiko/32/707_2.png) [@tao\_hiko](https://discuss.elastic.co/u/tao_hiko)\
**Post date:** [May 7, 2015, 4:56am UTC](https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410/4 "2015-05-07T04:56:09Z")

</div>

This problem is fixed, I replace "\" with "\\" and load again.

Finally, I create js script and run by node command that is work for me.

On Thursday, April 30, 2015 at 6:09:05 PM UTC+7, tao hiko wrote:

> Hi Mark,
> 
> I'm trying to use javascript to do that by bulk operation but I found some  
> issue when source data contain "\" that cannot insert to target index that  
> show below error
> 
> MapperParsingException[failed to parse [summary]]; nested:  
> JsonParseException[Unrecognized character escape 's' (code 115)
> 
> The source data contains path on Windows (eg. C:\path) so ES ejects that  
> document.
> 
> Hiko
> 
> On Tuesday, April 28, 2015 at 4:24:40 AM UTC+7, Mark Walkom wrote:
> 
> > Use one of the official clients to do it - [Elastic Docs | Elastic](http://www.elastic.co/guide/)
> > 
> > On 27 April 2015 at 20:02, tao hiko [tao...@gmail.com](mailto:tao...@gmail.com) wrote:
> > 
> > > I have similar 3 indices in same cluster and I will create new index for  
> > > support new change.
> > > 
> > > Anyone please suggest me, How to migrate data from those to the new one  
> > > easily?
> > > 
> > > Hiko.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/89a519e3-0beb-4cc4-ae0b-0742aedc2274%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## -- Please update your bookmarks! We moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/90d4c0ec-11a3-445e-8f07-4a38d34bc688%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/90d4c0ec-11a3-445e-8f07-4a38d34bc688%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:15am UTC](https://discuss.elastic.co/t/the-best-way-to-migrate-data-from-3-indices-to-new-index/23410/5 "2017-07-06T00:15:15Z")

</div>


