# Is it possible to restore a single backing index for a data stream

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-restore-a-single-backing-index-for-a-data-stream/341761>\
**Category:** Elasticsearch\
**Created:** [August 27, 2023, 7:12pm UTC](https://discuss.elastic.co/t/is-it-possible-to-restore-a-single-backing-index-for-a-data-stream/341761 "2023-08-27T19:12:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 30, 2023, 12:37am UTC](https://discuss.elastic.co/t/is-it-possible-to-restore-a-single-backing-index-for-a-data-stream/341761/4 "2023-08-30T00:37:13Z")

</div>

Hi @Russell_Fulton You got me thinnking about this and the answer is Yes!

So this is what I did ... I had a data stream Istio Logs

My Case I deleted this backing index  
`.ds-logs-istio.access_logs-default-2023.08.27-000453`

Then set it as a "custom" index pattern in the restore UI

 ![Screenshot 2023-08-29 at 5.03.10 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d23558571e31b522511af4608064fba18038cb1f.png)

Then Restored it

 ![Screenshot 2023-08-29 at 5.03.03 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d0d7a7ef8c9ee1b748866f53987c00486aafc23f.png)

At this point the backing index is restored... but I could not see the data in places...  
BTW it can take a while to restore etc.. etc...

@Russell_Fulton **Now here is the secret Sauce**... even though you restored the index you need to add it back to the data stream in my case you need to use the [Modify Data Stream API](https://www.elastic.co/guide/en/elasticsearch/reference/current/modify-data-streams-api.html#modify-data-streams-api)

```auto
POST _data_stream/_modify
{
  "actions": [
    {
      "add_backing_index": {
        "data_stream": "logs-istio.access_logs-default",
        "index": ".ds-logs-istio.access_logs-default-2023.08.27-000453"
      }
    }
  ]
}

```

I did not see a way to do this step via the API.  
Then it was all beautiful!

---

_[View the full topic](https://discuss.elastic.co/t/is-it-possible-to-restore-a-single-backing-index-for-a-data-stream/341761)._
