# How to migrate index A to index B in Elasticsearch without stopping writes to index A?

**URL:** https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198
**Category:** Elastic Search
**Tags:** reindex
**Created:** [December 19, 2024, 5:40am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198 "2024-12-19T05:40:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![WangXiang727](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wangxiang727/32/140172_2.png) [@WangXiang727](https://discuss.elastic.co/u/WangXiang727)
#### Post date: [December 19, 2024, 5:40am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198/1 "2024-12-19T05:40:39Z")

</div>

I'm using Elasticsearch 7.10.0 and need to migrate data from index A to a new index B without interrupting write operations to index A. I want to achieve zero downtime during this migration and to migrate both the existing (historical) data and the new, incoming (incremental) data.

Here's my current situation:

- **Elasticsearch Version:** 7.10.0

- **Source Index:** A (actively receiving writes)

- **Destination Index:** B (newly created, needs to be populated with data from A)

- **Constraint:** I've found that using the Reindex API in my 7.10.0 setup can lead to significant performance degradation on index A or even data inconsistency issues. Therefore, I'm looking for alternative solutions that avoid or minimize the use of Reindex for bulk data transfer.

- **Requirement:** Migrate both the full historical data from A and ensure that all new data written to A after the initial migration starts is also continuously synced to B.

Any advice, examples, or pointers to relevant documentation would be greatly appreciated. Thanks in advance for your help!

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [December 19, 2024, 6:33am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198/2 "2024-12-19T06:33:06Z")

</div>

> [@WangXiang727](#):
>
> I'm using Elasticsearch 7.10.0

This is really old and have been EOL and without security updates for a long time. I recommend that you upgrade to the latest version of Elasticsearch.

Are you just adding new data or also performing updates and/or deletes?

---

<div class="post-metadata">

### Author: ![WangXiang727](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wangxiang727/32/140172_2.png) [@WangXiang727](https://discuss.elastic.co/u/WangXiang727)
#### Post date: [December 19, 2024, 7:06am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198/3 "2024-12-19T07:06:19Z")

</div>

I get it, this version is super old , but we’re stuck with it for now because of some external reasons. My data is just write-only though—no updates or deletes.  
Any idea how I can fix this? Would really appreciate you help!

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [December 19, 2024, 7:21am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198/4 "2024-12-19T07:21:42Z")

</div>

> [@WangXiang727](#):
>
> My data is just write-only though—no updates or deletes.

That makes it a lot easier. As you will need to reindex all the data there will be additional load and there is no way to avoid that. I would probebly try creating the new index and then redirecting new writes there. Once the old index is no longer written to you can start a reindexing job of this data to the new index. You will have duplicates for a period of time if both indices are included in queries, but this will go away once reindexing is done and the old index is deleted.

---

<div class="post-metadata">

### Author: ![WangXiang727](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wangxiang727/32/140172_2.png) [@WangXiang727](https://discuss.elastic.co/u/WangXiang727)
#### Post date: [December 19, 2024, 7:38am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198/5 "2024-12-19T07:38:07Z")

</div>

Thank you this is very helpful to me.

I will design a technical solution based on your ideas (ﾉ\>ω\<)ﾉ

---

<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: [January 16, 2025, 7:38am UTC](https://discuss.elastic.co/t/how-to-migrate-index-a-to-index-b-in-elasticsearch-without-stopping-writes-to-index-a/372198/6 "2025-01-16T07:38:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
