# How to update the index along with aliases and documents while restoring from dump in elastic search?

**URL:** <https://discuss.elastic.co/t/how-to-update-the-index-along-with-aliases-and-documents-while-restoring-from-dump-in-elastic-search/102792>\
**Category:** Elasticsearch\
**Created:** [October 5, 2017, 6:18am UTC](https://discuss.elastic.co/t/how-to-update-the-index-along-with-aliases-and-documents-while-restoring-from-dump-in-elastic-search/102792 "2017-10-05T06:18:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![happy0088](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@happy0088](https://discuss.elastic.co/u/happy0088)\
**Post date:** [October 5, 2017, 6:18am UTC](https://discuss.elastic.co/t/how-to-update-the-index-along-with-aliases-and-documents-while-restoring-from-dump-in-elastic-search/102792/1 "2017-10-05T06:18:29Z")

</div>

HI , I need to modify and restore an index in elastic search alongwith the alias and documents inside it from the dump which is already present .

I have tried the below one :

```
POST /_snapshot/my_backup/snapshot_1/_restore
{
    "indices": "index_1", 
    "rename_pattern": "index_(.+)", 
    "rename_replacement": "restored_index_happy" ,
    "include_aliases":true
}

```

But it only updates the name of the index , keeping the alias and documents inside it as it is .

Thanks in advance .

---

<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:** [October 6, 2017, 4:39am UTC](https://discuss.elastic.co/t/how-to-update-the-index-along-with-aliases-and-documents-while-restoring-from-dump-in-elastic-search/102792/2 "2017-10-06T04:39:59Z")

</div>

> [@happy0088](#):
>
> But it only updates the name of the index , keeping the alias and documents inside it as it is .

Yep, you will need to change the alias with another operation after the restore.

---

<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:** [November 3, 2017, 4:40am UTC](https://discuss.elastic.co/t/how-to-update-the-index-along-with-aliases-and-documents-while-restoring-from-dump-in-elastic-search/102792/3 "2017-11-03T04:40:10Z")

</div>

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