# Deleting Old Snapshots

**URL:** <https://discuss.elastic.co/t/deleting-old-snapshots/134085>\
**Category:** Elasticsearch\
**Created:** [May 31, 2018, 4:06pm UTC](https://discuss.elastic.co/t/deleting-old-snapshots/134085 "2018-05-31T16:06:56Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MPurcell](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@MPurcell](https://discuss.elastic.co/u/MPurcell)\
**Post date:** [June 4, 2018, 5:43pm UTC](https://discuss.elastic.co/t/deleting-old-snapshots/134085/4 "2018-06-04T17:43:29Z")

</div>

Hi @Shaoranlaos I have setup curator and have my script -- it's show below:

Curator.yml

> client:  
> hosts:  
> - 'a data node'  
> port: 9200  
> url\_prefix:  
> use\_ssl: False  
> certificate:  
> client\_cert:  
> client\_key:  
> ssl\_no\_validate: False  
> http\_auth:  
> timeout: 30  
> master\_only: False
> 
> logging:  
> loglevel: INFO  
> logfile: D:\CuratorLogs\logs.txt  
> logformat: default  
> blacklist: ['elasticsearch', 'urllib3']

delete\_old\_snapshots.yml

> actions:  
> 1:  
> action: delete\_snapshots  
> description: \>-  
> Delete snapshots from the selected repository older than 100 days  
> (based on creation\_date), for everything but 'citydirectory-' prefixed snapshots.  
> options:  
> repository: 'dcs-elastic-snapshot'  
> disable\_action: False  
> filters:  
> - filtertype: pattern  
> kind: prefix  
> value: citydirectory-  
> exclude: True  
> - filtertype: age  
> source: creation\_date  
> direction: older  
> unit: days  
> unit\_count: 100

For some reason I keep getting the exception 'Failed to complete action: delete\_snapshots. \<class 'curator.exceptions.FailedExecution'\>: Unable to verify existence of repository dcs-elastic-snapshot  
'. Any idea why it's not finding the correct s3 repository?

---

_[View the full topic](https://discuss.elastic.co/t/deleting-old-snapshots/134085)._
