# Error: Invalid snapshot name snapshot with the same name already in-progress

**URL:** <https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [September 8, 2021, 1:14pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661 "2021-09-08T13:14:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [September 8, 2021, 1:14pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/1 "2021-09-08T13:14:19Z")

</div>

Hello dear friends I have a problem.  
I want to store an index that is in elasticsearch. I created a new repository for this and this repository does not have any snapshots. But when I ran the code blog below, it returned me the error message "Invalid snapshot name snapshot with the same name already in-progress " how can I fix this problem please help me.

**I created a new repository with the following code block:**

```auto
PUT /_snapshot/backup_repository
{
  "type": "fs",
  "settings": {
    "compress" : "true",
    "location": "C:/backups/backup_my_index"
  }
}

```

**just to be sure i used the code block below and the query returned me this result:**

```auto
GET /_snapshot/backup_repository/_status

result:
{
  "snapshots" : []
}

```

**I wanted to make a backup with the following code block:**

```auto
PUT /_snapshot/backup_repository/my_snapshot?wait_for_completion=true
{
  "indices": "my_index",
  "ignore_unavailable": true,
  "include_global_state": false,
  "metadata": {
    "taken_by": "busra duygu",
    "taken_because": "backup for my_index"
  }
}

```

**Error :**

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "invalid_snapshot_name_exception",
        "reason" : "[backup_repository:my_snapshot] Invalid snapshot name [my_snapshot], snapshot with the same name is already in-progress"
      }
    ],
    "type" : "invalid_snapshot_name_exception",
    "reason" : "[backup_repository:my_snapshot] Invalid snapshot name [my_snapshot], snapshot with the same name is already in-progress"
  },
  "status" : 400
}

```

I would be very happy if you could help me... 🙂

---

<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:** [September 9, 2021, 12:18am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/2 "2021-09-09T00:18:42Z")

</div>

What's the output from `GET /_snapshot/_status`?

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [September 9, 2021, 5:38am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/3 "2021-09-09T05:38:46Z")

</div>

> [@warkolm](#):
>
> GET /\_snapshot/\_status

@warkolm this query returned me the following result:

```auto
{
  "snapshots" : []
}

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 9, 2021, 5:53am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/4 "2021-09-09T05:53:58Z")

</div>

Did you set the `repo.path` in your elasticsearch.yml?

Note the syntax...

```auto
path:
  repo:
    - "E:\\Mount\\Backups"    

```

See here:

> **[Register a snapshot repository | Elasticsearch Guide \[7.14\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-filesystem-repository)**

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [September 9, 2021, 6:02am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/5 "2021-09-09T06:02:45Z")

</div>

@stephenb Yes, this is recorded in my elasticsearch.yml file.  
Exactly like this :  
`path.repo: C:/backups`

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 9, 2021, 2:03pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/6 "2021-09-09T14:03:18Z")

</div>

Well the syntax example is

```auto
path:
  repo:
    - "E:\\Mount\\Backups

```

So perhaps yours should be

```auto
path:
  repo:
    - "C:\\backups

```

Back slashes....

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [September 10, 2021, 5:43am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/7 "2021-09-10T05:43:37Z")

</div>

I tried that too but I still get the same error. The number of documents in the index I want to backup is very high, there are one and a half billion documents, and it is important for me to take a backup of this index.but I could not solve this error, I tried to create a new repository many times. Even though there are no snapshots in the repositories, the snapshot with the same name already exists.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 10, 2021, 2:19pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/8 "2021-09-10T14:19:43Z")

</div>

What happens when you try a snapshot with a different name?

Also I've seen errors like this when the permissions for that directory Do not let the same user that's running elastic write to that directory so make sure the permissions are correct.

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [September 17, 2021, 1:25pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/9 "2021-09-17T13:25:00Z")

</div>

It gave the same error when I created a snapshot with a different name. Could it be something with ram?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 17, 2021, 3:09pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/10 "2021-09-17T15:09:09Z")

</div>

> [@Busra\_Duygu](#):
>
> It gave the same error when I created a snapshot with a different name. Could it be something with ram?

Probably not, why would you guess that, what size server is this on?

Lets go through this step by step.

First per the docs all All windows paths should be of the following form see the docks [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-filesystem-repository)

Let's walk through this.

In the Elasticsearch.yml note the `"` and everything... did you put the Quotes in? For Windows paths you must user `\\` there is no "maybe" on this 🙂

Also make sure that directory has read / write privileges for the same use that runs elasticsearch.

```auto
path:
  repo:
    - "C:\\backups"

```

Restart Elasticsearch

Go to Kibana Dev Tools  
This command will report on all repositories

`GET _snapshot`

if there are any repositories delete them with

`DELETE _snapshot/repository_name`

Then create your repository

```auto
PUT /_snapshot/backup_repository
{
  "type": "fs",
  "settings": {
    "compress" : "true",
    "location": "C:\\backups\\backup_my_index"
  }
}

```

Then let's check the status of the repository you have not done that yet see what we get.

`GET /_snapshot/backup_repository`

You should see something like

```auto
{
  "backup_repository" : {
    "type" : "fs",
    "settings" : {
      "compress" : "true",
      "location" : "C:\\backups\\backup_my_index"
    }
  }
}

```

Did you get this response correctly? Report back.

If this all works then we will move onto the actual snapshot.

(BTW I just followed these steps and they all worked for me)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 17, 2021, 3:13pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/11 "2021-09-17T15:13:57Z")

</div>

After when you actually create a snapshot it should look like this

```auto
PUT /_snapshot/backup_repository/my_snapshot?wait_for_completion=true
{
  "indices": "*",
  "ignore_unavailable": true,
  "include_global_state": false,
  "metadata": {
    "taken_by": "busra duygu",
    "taken_because": "backup for my_index"
  }
}

```

You should get a response like

```auto
{
  "snapshot" : {
    "snapshot" : "my_snapshot",
    "uuid" : "FXCxOen3RLWigsEPqMsUEg",
    "repository" : "backup_repository",
    "version_id" : 7140199,
    "version" : "7.14.1",
    "indices" : [
      ".geoip_databases",
      ".kibana-event-log-7.14.1-000001",
      ".ds-ilm-history-5-2021.09.17-000001",
      "discuss-test",
      ".apm-agent-configuration",
      ".kibana_7.14.1_001",
      ".apm-custom-link",
      ".kibana_task_manager_7.14.1_001"
    ],
    "data_streams" : [
      "ilm-history-5"
    ],
    "include_global_state" : false,
    "metadata" : {
      "taken_by" : "busra duygu",
      "taken_because" : "backup for my_index"
    },
    "state" : "SUCCESS",
    "start_time" : "2021-09-17T15:11:38.560Z",
    "start_time_in_millis" : 1631891498560,
    "end_time" : "2021-09-17T15:11:39.984Z",
    "end_time_in_millis" : 1631891499984,
    "duration_in_millis" : 1424,
    "failures" : [],
    "shards" : {
      "total" : 8,
      "failed" : 0,
      "successful" : 8
    },
    "feature_states" : []
  }
}

```

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [October 5, 2021, 11:18am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/12 "2021-10-05T11:18:25Z")

</div>

@stephenb  
I followed all the steps as you said but after some time running this query ;

```auto
PUT /_snapshot/backup_repository/my_snapshot?wait_for_completion=true
{
  "indices": "my_index",
  "ignore_unavailable": true,
  "include_global_state": false,
  "metadata": {
    "taken_by": "busra duygu",
    "taken_because": "backup for my_index"
  }
}

```

it keeps giving same error. I don't understand what permissions you are talking about.  
Are you talking about permissions like this `xpack.security.enabled: true` . The backup process may continue in the background after giving this error. Because when I run the following query;  
`GET /_snapshot/backup_repository_bills_enn/_all`  
it first gave me an in-progress notification, and then it gave me a successful notification.

```auto
{
  "snapshots" : [
    {
      "snapshot" : "my_snapshot",
      "uuid" : "4Sv055VjQDSZvpBqSvCxpg",
      "version_id" : 7100199,
      "version" : "7.10.1",
      "indices" : [
        "my_index"
      ],
      "data_streams" : [],
      "include_global_state" : false,
      "metadata" : {
        "taken_by" : "busra duygu",
        "taken_because" : "backup for my_index"
      },
      "state" : "IN_PROGRESS",
      "start_time" : "2021-09-09T06:22:16.414Z",
      "start_time_in_millis" : 1631168536414,
      "end_time" : "1970-01-01T00:00:00.000Z",
      "end_time_in_millis" : 0,
      "duration_in_millis" : 0,
      "failures" : [],
      "shards" : {
        "total" : 0,
        "failed" : 0,
        "successful" : 0
      }
    }
  ]
}

```

As far as I understand, it did the backup process, but when I restore this index, it never works. I thought it was not properly backed up. The funny thing is that only this index has such a problem.I tried it in all my other indexes and I did not get such an error in any of them, and the backup and restore process worked properly in all of them.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 5, 2021, 1:49pm UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/13 "2021-10-05T13:49:21Z")

</div>

Well if it works for every other index I suspect perhaps there's something wrong with that index.

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [October 6, 2021, 8:02am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/14 "2021-10-06T08:02:11Z")

</div>

You are right, there may be a problem with this index. The following code block is the settings of the index. Is there anything that seems strange to you?

```auto
"my_index_name" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "refresh_interval" : "5s",
        "number_of_shards" : "1",
        "provided_name" : "my_index_name",
        "max_result_window" : "500000000",
        "creation_date" : "1611080136687",
        "analysis" : {
          "filter" : {
            "my_ascii_folding" : {
              "type" : "asciifolding",
              "preserve_original" : "true"
            },
            "english_stemmer" : {
              "type" : "stemmer",
              "language" : "english"
            },
            "english_possessive_stemmer" : {
              "type" : "stemmer",
              "language" : "possessive_english"
            },
            "english_stop" : {
              "type" : "stop",
              "stopwords" : [
                "_english_"
              ]
            }
          },
          "analyzer" : {
            "english_analyzer" : {
              "filter" : [
                "my_ascii_folding",
                "lowercase",
                "english_stop",
                "english_stemmer",
                "english_possessive_stemmer"
              ],
              "type" : "custom",
              "tokenizer" : "standard"
            }
          },
          "tokenizer" : {
            "comma_analyzer" : {
              "pattern" : ",",
              "type" : "pattern"
            }
          }
        },
        "number_of_replicas" : "0",
        "uuid" : "bcffDF556df4gfdf4h54fkj5f1h",
        "version" : {
          "created" : "7100199"
        }
      }
    }
  }
}

```

---

<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 3, 2021, 8:03am UTC](https://discuss.elastic.co/t/error-invalid-snapshot-name-snapshot-with-the-same-name-already-in-progress/283661/15 "2021-11-03T08:03:01Z")

</div>

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