# Backup and Restore an index

**URL:** <https://discuss.elastic.co/t/backup-and-restore-an-index/23709>\
**Category:** Elasticsearch\
**Created:** [May 28, 2015, 5:09pm UTC](https://discuss.elastic.co/t/backup-and-restore-an-index/23709 "2015-05-28T17:09:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sagar\_Shah](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@Sagar\_Shah](https://discuss.elastic.co/u/Sagar_Shah)\
**Post date:** [May 28, 2015, 5:09pm UTC](https://discuss.elastic.co/t/backup-and-restore-an-index/23709/1 "2015-05-28T17:09:26Z")

</div>

Hello everyone,  
I am using elastic search 1.4.2 and trying to work out a way on back up and  
restore operation of an index.

Objective:  
An index is already present on a system with some mapping. During system  
upgrade, mapping needs to be updated, which is not possible easily in  
elastic search without reindexing.

So here's one path that I have chosen.

- Take backup of existing index on file system
- Delete existing index
- Create an index with same name but with new mapping
- Restore the (backed up) index. - Issue: When restoring index here, it  
also overwrites mapping to previous state, the way it was defined on  
original index. Is there a way to restore only the data and not  
settings/mapping. Or is there a way to restore index explicitly with new  
mappings?

Other option that I see is to create restore into a new index and then  
perform bulk indexing on original index name. But that seems too much to me  
just to perform data backup and restore.

Index is expected to have about 80 millions of records

Is there a way to ease this process?

Appreciate your inputs & suggestions

Regards,  
Sagar Shah

## -- Please update your bookmarks! We have 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/77d67425-4ed8-403a-b9ff-9410fc02e1f8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77d67425-4ed8-403a-b9ff-9410fc02e1f8%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:** [May 28, 2015, 10:01pm UTC](https://discuss.elastic.co/t/backup-and-restore-an-index/23709/2 "2015-05-28T22:01:31Z")

</div>

Why not just use an alias, then you don't have to worry about conflicting  
names.  
Otherwise I have been having luck using LS 1.5 to reindex -

> <https://gist.github.com/markwalkom/8a7201e3f6ea4354ae06>

PS - We're moving to [https://discuss.elastic.co/](https://discuss.elastic.co/), please join us there for  
any future discussions!

On 29 May 2015 at 03:09, Sagar Shah [sagarshah1983@gmail.com](mailto:sagarshah1983@gmail.com) wrote:

> Hello everyone,  
> I am using Elasticsearch 1.4.2 and trying to work out a way on back up  
> and restore operation of an index.
> 
> Objective:  
> An index is already present on a system with some mapping. During system  
> upgrade, mapping needs to be updated, which is not possible easily in  
> Elasticsearch without reindexing.
> 
> So here's one path that I have chosen.
> 
> - Take backup of existing index on file system
> - Delete existing index
> - Create an index with same name but with new mapping
> - Restore the (backed up) index. - Issue: When restoring index here, it  
> also overwrites mapping to previous state, the way it was defined on  
> original index. Is there a way to restore only the data and not  
> settings/mapping. Or is there a way to restore index explicitly with new  
> mappings?
> 
> Other option that I see is to create restore into a new index and then  
> perform bulk indexing on original index name. But that seems too much to me  
> just to perform data backup and restore.
> 
> Index is expected to have about 80 millions of records
> 
> Is there a way to ease this process?
> 
> Appreciate your inputs & suggestions
> 
> Regards,  
> Sagar Shah
> 
> ## -- Please update your bookmarks! We have 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/77d67425-4ed8-403a-b9ff-9410fc02e1f8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77d67425-4ed8-403a-b9ff-9410fc02e1f8%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/77d67425-4ed8-403a-b9ff-9410fc02e1f8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/77d67425-4ed8-403a-b9ff-9410fc02e1f8%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 have 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/CAEYi1X-od439iz3tgNrSq0HP61%3DZEvDKTnoTkXhvTsFJ5BmZXg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-od439iz3tgNrSq0HP61%3DZEvDKTnoTkXhvTsFJ5BmZXg%40mail.gmail.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:11am UTC](https://discuss.elastic.co/t/backup-and-restore-an-index/23709/3 "2017-07-06T00:11:09Z")

</div>


