# Creating multiple snapshots one after other immediatly

**URL:** <https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926>\
**Category:** Elasticsearch\
**Created:** [November 8, 2017, 7:59pm UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926 "2017-11-08T19:59:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kabali12345](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@kabali12345](https://discuss.elastic.co/u/kabali12345)\
**Post date:** [November 8, 2017, 7:59pm UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926/1 "2017-11-08T19:59:24Z")

</div>

Hi All.......

Here i am trying to create two snapshots at a time from Kibana devtool  
here are my commands looks like

```auto
PUT /_snapshot/repo/dev_1?wait_for_completion=true
PUT /_snapshot/repo/dev_2?wait_for_completion=true

```

here first i run the dec\_1 snapshot after that i tried running second snapshot dev\_2  
but it throws me an error like this

```auto
{
 "error": {
   "root_cause": [
     {
       "type": "concurrent_snapshot_execution_exception",
       "reason": "[repo:dev_2]a snapshot is already running"
     }
   ],
   "type": "concurrent_snapshot_execution_exception",
   "reason": "[repo:dev_2]a snapshot is already running"
 },
 "status": 503
}

```

Will this test case accepts elasticsearch?  
or i need to wait untill the first snapshot process to be fineshed

Thank You.

---

<div class="post-metadata">

**Author:** ![iamredlus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iamredlus/32/15504_2.png) [@iamredlus](https://discuss.elastic.co/u/iamredlus)\
**Post date:** [November 9, 2017, 1:55am UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926/2 "2017-11-09T01:55:00Z")

</div>

Hi,

I've stumbled upon a similar issue when using the elasticsearch Snapshot API:

> [@Snapshot queue](https://discuss.elastic.co/t/snapshot-queue/106954):
>
> Hi, We've been trying to automate index snapshot creation through the elasticseasrch snapshot API. However, we get an exception when trying to run more than one snapshot in parallel: elasticsearch.exceptions.TransportError: TransportError(503, 'concurrent\_snapshot\_execution\_exception', 'a snapshot is already running') This is an odd behavior, as elasticsearch already has many queues for many of its operations - and I'd expect the same for snapshots and restores. Is there any way to let elas…

It seems like an internal limitation and a lack of queue implementation.  
Hopefully, there is some kind of workaround.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 9, 2017, 2:31am UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926/3 "2017-11-09T02:31:53Z")

</div>

There can only be one snapshot taken at a time. This is because we do things under the hood like stop merging of segments to ensure consistency.

---

<div class="post-metadata">

**Author:** ![iamredlus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iamredlus/32/15504_2.png) [@iamredlus](https://discuss.elastic.co/u/iamredlus)\
**Post date:** [November 9, 2017, 2:43am UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926/4 "2017-11-09T02:43:19Z")

</div>

As our cluster holds data for different users, retentions, and replica SLAs, we need to execute several snapshot tasks every day.

I understand there is a technical limitation for actually running two snapshots concurrently, but I think it would be a good idea to have elasticsearch add snapshots requests to a queue, automatically executing each snapshot as the previous finished running.

Otherwise, we are left with the same limitation but having to manage a queueing mechanism for elasticsearch, tracking what is the current snapshot, whether it has finished and only then run call the API for the next snapshot task. This is a lot of overhead for a relatively simple use case 😓

#feature\_request

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 9, 2017, 4:04am UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926/5 "2017-11-09T04:04:07Z")

</div>

If you'd like to see this then please do raise a feature request on Github [https://github.com/elastic/elasticsearch/issues](https://github.com/elastic/elasticsearch/issues) 😃

---

<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:** [December 7, 2017, 4:04am UTC](https://discuss.elastic.co/t/creating-multiple-snapshots-one-after-other-immediatly/106926/6 "2017-12-07T04:04:18Z")

</div>

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