# Index UUIDs in snapshots

**URL:** <https://discuss.elastic.co/t/index-uuids-in-snapshots/77175>\
**Category:** Elasticsearch\
**Created:** [March 2, 2017, 4:26pm UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175 "2017-03-02T16:26:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eirc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eirc/32/11769_2.png) [@eirc](https://discuss.elastic.co/u/eirc)\
**Post date:** [March 2, 2017, 4:26pm UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175/1 "2017-03-02T16:26:14Z")

</div>

Hello,

we upgraded to ES 5 and we are trying to check the disk usage of our snapshots _by index_. The new scheme of using index UUIDs as folder names makes it impossible for us to know what folder corresponds to what index.

For indices that are still on ES we can get an index's UUID with the `_cat/indices` API but for indices that have been deleted on the cluster we cannot find that info and the snapshot API does not provide it.

```auto
  ...
  {
    "snapshot": "XXX-snapshot-20170219020644",
    "uuid": "XXXXXXXXXXXXXXXXXXX",
    "version_id": 5010299,
    "version": "5.1.2",
    "indices": [
      "XXXXXX-2017.02.18",
      "XXXXXX-2017.02.17"
    ],
    "state": "SUCCESS",
    "start_time": "2017-02-19T02:06:44.710Z",
    "start_time_in_millis": 1487470004710,
    "end_time": "2017-02-19T02:09:06.938Z",
    "end_time_in_millis": 1487470146938,
    "duration_in_millis": 142228,
    "failures": [],
    "shards": {
      "total": 4,
      "failed": 0,
      "successful": 4
    }
  },
  ...

```

In that API that the snapshot UUID is provided but not the index UUID.

If there was some API to return the snapshot disk usage by index we'd be ok with that too of course.

Note that we're using S3-backed snapshot repositories.

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 3, 2017, 10:59am UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175/2 "2017-03-03T10:59:06Z")

</div>

It's not actually the index uuid that is used, see the comment here: [https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/repositories/IndexId.java#L64-L72](https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/repositories/IndexId.java#L64-L72)

I'm not sure whether we should expose the location of the actual files in our APIs or whether that should remain an implementation detail. If you think that this is an important feature to have, please open an issue on Elasticsearch's Github repository and explicitly mark it as a feature request.

---

<div class="post-metadata">

**Author:** ![eirc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eirc/32/11769_2.png) [@eirc](https://discuss.elastic.co/u/eirc)\
**Post date:** [March 3, 2017, 12:23pm UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175/3 "2017-03-03T12:23:21Z")

</div>

Haha nice trap with that ID 😃

As I said above my goal is not really to find out the paths but to see how much disk space each index takes up on the repository. I was able to do that back on 2.0 when paths where named after indices but not anymore.

You think I should open a feature request for getting the snapshoted index sizes on the API? Maybe that's available already somewhere else and I missed it?

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 3, 2017, 12:38pm UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175/4 "2017-03-03T12:38:20Z")

</div>

I could not find any feature request like that. Maybe it makes sense to formulate the feature request more generally, for example to have an index - level view on snapshots instead of a snapshot id - based view, i.e., have an API where you can ask what the snapshots are that contain index XYZ. The API could then return size of files referenced by each snapshot and also total size.

---

<div class="post-metadata">

**Author:** ![eirc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eirc/32/11769_2.png) [@eirc](https://discuss.elastic.co/u/eirc)\
**Post date:** [March 3, 2017, 1:15pm UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175/5 "2017-03-03T13:15:39Z")

</div>

Thanks m8, opened up the feature request: [https://github.com/elastic/elasticsearch/issues/23479](https://github.com/elastic/elasticsearch/issues/23479)

---

<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:** [March 31, 2017, 1:15pm UTC](https://discuss.elastic.co/t/index-uuids-in-snapshots/77175/6 "2017-03-31T13:15:47Z")

</div>

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