# Ignore\_missing flag in snapshot listing?

**URL:** <https://discuss.elastic.co/t/ignore-missing-flag-in-snapshot-listing/18213>\
**Category:** Elasticsearch\
**Created:** [June 19, 2014, 3:42pm UTC](https://discuss.elastic.co/t/ignore-missing-flag-in-snapshot-listing/18213 "2014-06-19T15:42:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon44344346](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@anon44344346](https://discuss.elastic.co/u/anon44344346)\
**Post date:** [June 19, 2014, 3:42pm UTC](https://discuss.elastic.co/t/ignore-missing-flag-in-snapshot-listing/18213/1 "2014-06-19T15:42:14Z")

</div>

When I want to list the snapshots that are within a certain repository, I  
issue the following command:  
curl -XGET [http://localhost:9200/\_snapshots/](http://localhost:9200/_snapshots/)\<repository\_name\>/\_all

as I understand, this is the only way of doing it.

However, chances are that while I'm issuing that command, some other  
process may delete a snapshot. I' ve found that it may provoke an error  
response from the list command, given the right conditions. I've figured  
that when the \_all api call is made, elastic search finds out about every  
snapshot it has in the repository, and then fetch info from every one of  
them (by doing something similar to what  
curl -XGET http:  
[//localhost:9200/\_snapshots/](https://localhost:9200/_snapshots/)\<repository\_name\>/\<snapshot\_name\>

does), and the returns a listing with the collected info.

If a snapshot is deleted by some other process AFTER elasticsearch has got  
all the snapshot names, and BEFORE elasticsearch starts collecting info of  
every one of them, an error related to elasticsearch not being able to find  
that particular snapshot is thrown.

My question is

- Is it possible to use a flag like "ignore\_missing\_snapshots" or  
something like that when making the curl -XGET http:  
[//localhost:9200/\_snapshots/](https://localhost:9200/_snapshots/)\<repository\_name\>/\_all call?

- Can I "list by prefix", telling elastic search I want to list only the  
snapshots that starts by certain prefix? something like -XGET [http://localhost:9200/\_snapshots/](http://localhost:9200/_snapshots/)\<repository\_name\>/\_all?prefix=  
that way I could make sure the listing process doesn't interfere with the  
possible deletion process

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d31b55f3-2393-483e-bf7a-560c956483ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d31b55f3-2393-483e-bf7a-560c956483ad%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:21am UTC](https://discuss.elastic.co/t/ignore-missing-flag-in-snapshot-listing/18213/2 "2017-07-06T01:21:09Z")

</div>

Closed on July 6, 2017, 1:21am UTC


