# Restore data for only a specific index within a data stream

**URL:** <https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [December 25, 2024, 10:56am UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386 "2024-12-25T10:56:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![debuggedme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debuggedme/32/139805_2.png) [@debuggedme](https://discuss.elastic.co/u/debuggedme)\
**Post date:** [December 25, 2024, 10:56am UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386/1 "2024-12-25T10:56:06Z")

</div>

Regarding the snapshot and restore functionality for data streams, I can only snapshot all the data within a data stream at once, and when restoring, I can only restore all the data at once as well.

Is it possible to restore data for only a specific index within a data stream?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 25, 2024, 2:39pm UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386/2 "2024-12-25T14:39:35Z")

</div>

> [@debuggedme](#):
>
> Is it possible to restore data for only a specific index within a data stream?

Yes, in the restore UI in Kibana just select _Index Patterns_ and type the name of the backing indices of the data stream.

That's how I always did it.

You will need to add the backing index to the data stream manually later.

```auto
POST _data_stream/_modify
{
  "actions": [
    {
      "add_backing_index": {
        "data_stream": "data-stream",
        "index": ".backing-indice"
      }
    }
  ]
}

```

Also, in the _Modify index Settings_ option you will probably need to add this:

```auto
{
  "index.lifecycle.name": null,
  "index.final_pipeline": null,
  "index.default_pipeline": null,
  "index.number_of_replicas": "0",
  "index.hidden": false
}

```

---

<div class="post-metadata">

**Author:** ![debuggedme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debuggedme/32/139805_2.png) [@debuggedme](https://discuss.elastic.co/u/debuggedme)\
**Post date:** [December 25, 2024, 3:26pm UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386/3 "2024-12-25T15:26:18Z")

</div>

Awesome

---

<div class="post-metadata">

**Author:** ![debuggedme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debuggedme/32/139805_2.png) [@debuggedme](https://discuss.elastic.co/u/debuggedme)\
**Post date:** [December 26, 2024, 2:49am UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386/4 "2024-12-26T02:49:17Z")

</div>

hi @leandrojmp

By the way, is there any plan to optimize the recovery of specific index snapshots within a data stream? The storage on Elasticsearch nodes cannot be configured with standard redundancy for restoring the entire data stream snapshot, and recovering specific indices requires using the data stream API via Dev Tools, which is not very user-friendly.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 26, 2024, 3:16am UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386/5 "2024-12-26T03:16:19Z")

</div>

> [@debuggedme](#):
>
> By the way, is there any plan to optimize the recovery of specific index snapshots within a data stream?

No idea, I do not work at Elastic.

Elastic also does not provide any information about roadmaps and future features, you should open an Enhancement request if you have a support contract or a feature request in Github.

But I agree that the UI/UX related to restorign snapshots could be improved.

Sometimes the user may not even know that a backing index of a data stream is hidden per default, and restoring individual indices without changing `index.hidden` to `false` will make those indices to not appear on the restore page, so this can be confusing for the user.

---

<div class="post-metadata">

**Author:** ![debuggedme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debuggedme/32/139805_2.png) [@debuggedme](https://discuss.elastic.co/u/debuggedme)\
**Post date:** [December 26, 2024, 3:48am UTC](https://discuss.elastic.co/t/restore-data-for-only-a-specific-index-within-a-data-stream/372386/6 "2024-12-26T03:48:23Z")

</div>

> [@leandrojmp](#):
>
> restoring individual indices without changing `index.hidden` to `false` will make those indices to not appear on the restore page, so this can be confusing for the user.

Couldn't agree more.  
It will only appear on the restore status page after using the stream's modify.

hi @jughosta, Could this be made a bit more user-friendly? At the very least, it could inform me of a status like "waiting to be added a data stream."
