<2> The settings of this index that contains the metadata we are looking for.
+
<3> This indicates that this index is part of a data stream and displays the data stream name.
+
<4> The name of the other index we requested.
+
The response above shows that `kibana_sample_data_flights` is not part of a data stream because it doesn't have a
field called `data_stream` in the settings.
+
On the contrary, `.ds-my-data-stream-2022.06.17-000001` is part of the data stream called `my-data-stream`. When you
find an index like this, which belongs to a data stream, you need to check if data are still being indexed.
You can see that by checking the `settings`, if you can find this property: `"index.lifecycle.indexing_complete" : "true"`,
it means that indexing is completed in this index and you can continue to the next step.
+
If `index.lifecycle.indexing_complete` is not there or is configured to `false` you need to rollover the data stream so you can restore the missing data without blocking
the ingestion of new data. The following command will achieve that.
+
[source,console]
----
POST my-data-stream/_rollover
----
// TEST[skip:illustration purposes only]
. Now that the data stream preparation is done, we will close the target indices by using the
<<indices-close, close indices API>>.
+
[source,console]
----
POST kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001/_close
----
// TEST[skip:illustration purposes only]
+
You can confirm that they are closed with
the <<cat-indices, cat indices API>>.
+
[source,console]
----
GET _cat/indices?v&health=red&h=index,status,health
----
// TEST[skip:illustration purposes only]
+
The response will look like this:
+
[source,console-result]
----
index status health
.ds-my-data-stream-2022.06.17-000001 close red
kibana_sample_data_flights close red
----
+
. The indices are closed, now we can restore them from snapshots without causing
any complications using the <<restore-snapshot-api, restore snapshot API>>:
+
[source,console]
----
POST _snapshot/my_repository/snapshot-20200617/_restore
<2> The settings of this index that contains the metadata we are looking for.
+
<3> This indicates that this index is part of a data stream and displays the data stream name.
+
<4> The name of the other index we requested.
+
The response above shows that `kibana_sample_data_flights` is not part of a data stream because it doesn't have a
field called `data_stream` in the settings.
+
On the contrary, `.ds-my-data-stream-2022.06.17-000001` is part of the data stream called `my-data-stream`. When you
find an index like this, which belongs to a data stream, you need to check if data are still being indexed.
You can see that by checking the `settings`, if you can find this property: `"index.lifecycle.indexing_complete" : "true"`,
it means that indexing is completed in this index and you can continue to the next step.
+
If `index.lifecycle.indexing_complete` is not there or is configured to `false` you need to rollover the data stream so you can restore the missing data without blocking
the ingestion of new data. The following command will achieve that.
+
[source,console]
----
POST my-data-stream/_rollover
----
// TEST[skip:illustration purposes only]
. Now that the data stream preparation is done, we will close the target indices by using the
<<indices-close, close indices API>>.
+
[source,console]
----
POST kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001/_close
----
// TEST[skip:illustration purposes only]
+
You can confirm that they are closed with
the <<cat-indices, cat indices API>>.
+
[source,console]
----
GET _cat/indices?v&health=red&h=index,status,health
----
// TEST[skip:illustration purposes only]
+
The response will look like this:
+
[source,console-result]
----
index status health
.ds-my-data-stream-2022.06.17-000001 close red
kibana_sample_data_flights close red
----
+
. The indices are closed, now we can restore them from snapshots without causing
any complications using the <<restore-snapshot-api, restore snapshot API>>:
+
[source,console]
----
POST _snapshot/my_repository/snapshot-20200617/_restore