# Close Indices snapshot not being taken in ES 7.4.2

**URL:** <https://discuss.elastic.co/t/close-indices-snapshot-not-being-taken-in-es-7-4-2/234322>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, slm-snapshot-lifecycle-management\
**Created:** [May 26, 2020, 12:04pm UTC](https://discuss.elastic.co/t/close-indices-snapshot-not-being-taken-in-es-7-4-2/234322 "2020-05-26T12:04:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav6141](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@Gaurav6141](https://discuss.elastic.co/u/Gaurav6141)\
**Post date:** [May 26, 2020, 12:04pm UTC](https://discuss.elastic.co/t/close-indices-snapshot-not-being-taken-in-es-7-4-2/234322/1 "2020-05-26T12:04:18Z")

</div>

Hi,

I was trying to take snapshot of all indices but it looks like close indices are omitted from snapshot until specified explicitly with name.

This what I did. I created two indices and injected some dummy documents into them. And closed one index.

```
% curl localhost:9200/_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow close twitter cpSNr17-T4C952qjOncUZQ 3 2
yellow open facebook ZlACnCrxTluRwHR40Q2kyQ 3 2 2 0 8.8kb 8.8kb

```

You can see that twitter index is closed but facebook is open.

Now I tried to create snapshot by following commands

```
% curl -X PUT "localhost:9200/_snapshot/my_backup/test_close2" -H 'Content-Type: application/json' -d'
 {
"indices": "*"
 }'

```

and also by this:

```
curl -X PUT "localhost:9200/_snapshot/my_backup/snapshot_1?wait_for_completion=true&pretty"    

```

In both of the ways **twitter** index was not included in indices that were snapshotted

Proof:

```
% curl -X GET "localhost:9200/_snapshot/my_backup/test_close2?pretty"
 {
"snapshots" : [
{
  "snapshot" : "test_close2",
  "uuid" : "-zEn7E8-RqiHIQ5JB7S-Ug",
  "version_id" : 7040299,
  "version" : "7.4.2",
  "indices" : [
    "facebook"
  ],
  "include_global_state" : true,
  "state" : "SUCCESS",
  "start_time" : "2020-05-26T11:26:47.498Z",
  "start_time_in_millis" : 1590492407498,
  "end_time" : "2020-05-26T11:26:47.698Z",
  "end_time_in_millis" : 1590492407698,
  "duration_in_millis" : 200,
  "failures" : [],
  "shards" : {
    "total" : 3,
    "failed" : 0,
    "successful" : 3
  }
}
]
}

% curl -X GET "localhost:9200/_snapshot/my_backup/snapshot_1?pretty"
{
"snapshots" : [
{
  "snapshot" : "snapshot_1",
  "uuid" : "umRMmuKsQDycx9v-nCenEA",
  "version_id" : 7040299,
  "version" : "7.4.2",
  "indices" : [
    "facebook"
  ],
  "include_global_state" : true,
  "state" : "SUCCESS",
  "start_time" : "2020-05-26T11:16:14.258Z",
  "start_time_in_millis" : 1590491774258,
  "end_time" : "2020-05-26T11:16:14.258Z",
  "end_time_in_millis" : 1590491774258,
  "duration_in_millis" : 0,
  "failures" : [],
  "shards" : {
    "total" : 3,
    "failed" : 0,
    "successful" : 3
  }
}
]
}

```

From the above snapshots API response you can see that closed index **twitter** is not included in any of the above snapshot taken(test\_close2 and snapshot\_1)

But interestingly if we specifically add `twitter`(which the closed index) in the indices then snapshot is taken for that index

```
% curl -X PUT "localhost:9200/_snapshot/my_backup/test_close" -H 'Content-Type: application/json' -d'
 {
 "indices": "twitter"
}'

```

Snapshot GET API repsonse for the above snapshot:

```
curl -X GET "localhost:9200/_snapshot/my_backup/test_close?pretty"
{
  "snapshots" : [
    {
      "snapshot" : "test_close",
      "uuid" : "cekfChOsRlmqKQlWjs1dlw",
      "version_id" : 7040299,
      "version" : "7.4.2",
      "indices" : [
        "twitter"
      ],
      "include_global_state" : true,
      "state" : "SUCCESS",
      "start_time" : "2020-05-26T11:18:45.115Z",
      "start_time_in_millis" : 1590491925115,
      "end_time" : "2020-05-26T11:18:45.316Z",
      "end_time_in_millis" : 1590491925316,
      "duration_in_millis" : 201,
      "failures" : [],
      "shards" : {
        "total" : 3,
        "failed" : 0,
        "successful" : 3
      }
    }
  ]
}

```

You can find `twitter` index being snapshoted in `test_close` snapshot

I wanted to know is this expected behavior?  
If yes, wont you think snapshot API should also include a parameter to specify that include close indices as well while taking snapshot

If there is already a way please let me know?

---

<div class="post-metadata">

**Author:** ![Gaurav6141](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@Gaurav6141](https://discuss.elastic.co/u/Gaurav6141)\
**Post date:** [May 27, 2020, 6:09am UTC](https://discuss.elastic.co/t/close-indices-snapshot-not-being-taken-in-es-7-4-2/234322/2 "2020-05-27T06:09:56Z")

</div>

Any updates here?

---

<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:** [June 24, 2020, 6:10am UTC](https://discuss.elastic.co/t/close-indices-snapshot-not-being-taken-in-es-7-4-2/234322/3 "2020-06-24T06:10:04Z")

</div>

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