# How to programmatically cancel a running snapshot on Elastic Cloud

**URL:** https://discuss.elastic.co/t/how-to-programmatically-cancel-a-running-snapshot-on-elastic-cloud/154220
**Category:** Elasticsearch
**Created:** [October 26, 2018, 2:42pm UTC](https://discuss.elastic.co/t/how-to-programmatically-cancel-a-running-snapshot-on-elastic-cloud/154220 "2018-10-26T14:42:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mrubin](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mrubin](https://discuss.elastic.co/u/mrubin)
#### Post date: [October 26, 2018, 2:42pm UTC](https://discuss.elastic.co/t/how-to-programmatically-cancel-a-running-snapshot-on-elastic-cloud/154220/1 "2018-10-26T14:42:56Z")

</div>

I have cron jobs configured which delete old indices. I just noticed that some of these curl commands are failing with the below message:

> "Cannot delete indices that are being snapshotted: [[...]]. Try again after snapshot finishes or cancel the currently running snapshot."

How can I cancel any currently-running snapshots so that my index deletion can go through? This is on Elastic Cloud.

Thank you

---

<div class="post-metadata">

### Author: ![mrubin](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mrubin](https://discuss.elastic.co/u/mrubin)
#### Post date: [October 30, 2018, 3:33pm UTC](https://discuss.elastic.co/t/how-to-programmatically-cancel-a-running-snapshot-on-elastic-cloud/154220/2 "2018-10-30T15:33:55Z")

</div>

_Bump_

Thank you

---

<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: [November 27, 2018, 3:33pm UTC](https://discuss.elastic.co/t/how-to-programmatically-cancel-a-running-snapshot-on-elastic-cloud/154220/3 "2018-11-27T15:33:56Z")

</div>

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