# Can we rename any index?

**URL:** <https://discuss.elastic.co/t/can-we-rename-any-index/293377>\
**Category:** Elasticsearch\
**Created:** [January 3, 2022, 6:03pm UTC](https://discuss.elastic.co/t/can-we-rename-any-index/293377 "2022-01-03T18:03:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash\_196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yash_196/32/99273_2.png) [@yash\_196](https://discuss.elastic.co/u/yash_196)\
**Post date:** [January 3, 2022, 6:03pm UTC](https://discuss.elastic.co/t/can-we-rename-any-index/293377/1 "2022-01-03T18:03:42Z")

</div>

Is there any way to rename an index without the need of copying data to another index ?

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [January 3, 2022, 6:10pm UTC](https://discuss.elastic.co/t/can-we-rename-any-index/293377/2 "2022-01-03T18:10:25Z")

</div>

You can use an alias to do that and point to the old index with it, but to change the original index will require a reindex.

```auto
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "my-old-name",
        "alias": "my-new-name"
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![yash\_196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yash_196/32/99273_2.png) [@yash\_196](https://discuss.elastic.co/u/yash_196)\
**Post date:** [January 3, 2022, 6:11pm UTC](https://discuss.elastic.co/t/can-we-rename-any-index/293377/3 "2022-01-03T18:11:17Z")

</div>

does reindexing means we have to copy data to a new index?

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [January 3, 2022, 6:11pm UTC](https://discuss.elastic.co/t/can-we-rename-any-index/293377/4 "2022-01-03T18:11:46Z")

</div>

Yeah, exactly

---

<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 31, 2022, 6:12pm UTC](https://discuss.elastic.co/t/can-we-rename-any-index/293377/5 "2022-01-31T18:12:46Z")

</div>

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