# S3 Snapshot backing up newly made indexes

**URL:** https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710
**Category:** Elasticsearch
**Created:** [July 3, 2019, 12:51pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710 "2019-07-03T12:51:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![iukea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iukea/32/49083_2.png) [@iukea](https://discuss.elastic.co/u/iukea)
#### Post date: [July 3, 2019, 12:51pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/1 "2019-07-03T12:51:51Z")

</div>

Hello,  
I am having issues backing up a new index to my S3 bucket

**About my setup**  
I am using Elk 6.8.0 with a new index being made each day with the following format  
LogStash-(Year, month day)

I am also using the ElasticSearch S3 SnapShot plugin.

I was able to back up some of my indexes to an S3 bucket from running the following command, and it worked!!!!!.

```auto
PUT _snapshot/my_s3_repository/backup
{
  "type": "s3",
  "settings": {
    "bucket": "ts-threat-indexes",
    "compress": true,
    "region": "us-east-2b"
  }
}

```

| logstash-2019.06.07 |
| --- |
| logstash-2019.06.08 |
| logstash-2019.06.09 |
| logstash-2019.06.10 |
| logstash-2019.06.11 |
| logstash-2019.06.12 |
| logstash-2019.06.13 |
| logstash-2019.06.14 |
| logstash-2019.06.15 |
| logstash-2019.06.16 |
| logstash-2019.06.17 |
| logstash-2019.06.18 |
| logstash-2019.06.19 |
| logstash-2019.06.21 |
| logstash-2019.06.22 |
| logstash-2019.06.23 |
| logstash-2019.06.24 |
| logstash-2019.06.25 |
| logstash-2019.06.26 |
| logstash-2019.06.27 |

My Issue.

A new index was made and I want to back it up

```auto
logstash-2019.06.30

```

I ran the following command

```auto
PUT _snapshot/my_s3_repository/backup/
{
  "indices": "logstash-2019.06.30",
  "include_global_state": false
  }

```

But got an error ☹

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "invalid_snapshot_name_exception",
        "reason": "[my_s3_repository:backup] Invalid snapshot name [backup], snapshot with the same name already exists"
      }
    ],
    "type": "invalid_snapshot_name_exception",
    "reason": "[my_s3_repository:backup] Invalid snapshot name [backup], snapshot with the same name already exists"
  },
  "status": 400
}

```

This all said when I run the code below, it works fine.

```auto
PUT _snapshot/my_s3_repository/backup/logstash-2019.06.30/
{
  "indices": "logstash-2019.06.30",
  "include_global_state": false
  }

```

Do I have to make a new ElasticSearch S3 repo every time I want to take a backup/snapshot of a newly formed index?

@dadoonet Do you have any words of wisdom?

---

<div class="post-metadata">

### Author: ![iukea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iukea/32/49083_2.png) [@iukea](https://discuss.elastic.co/u/iukea)
#### Post date: [July 3, 2019, 4:22pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/2 "2019-07-03T16:22:50Z")

</div>

How do i add a snapshot to an /backup/ repo?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 3, 2019, 4:35pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/3 "2019-07-03T16:35:45Z")

</div>

> [@iukea](#):
>
> @dadoonet Do you have any words of wisdom?

Please don't ping people who are not yet involved in your thread.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 3, 2019, 4:37pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/4 "2019-07-03T16:37:07Z")

</div>

That should work I guess...

```auto
PUT _snapshot/my_s3_repository/backup/snap1
{
  "indices": "logstash-2019.06.30",
  "include_global_state": false
}
PUT _snapshot/my_s3_repository/backup/snap2
{
  "indices": "logstash-2019.07.01",
  "include_global_state": false
}

```

---

<div class="post-metadata">

### Author: ![iukea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iukea/32/49083_2.png) [@iukea](https://discuss.elastic.co/u/iukea)
#### Post date: [July 3, 2019, 6:50pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/5 "2019-07-03T18:50:28Z")

</div>

is there any other way to add an index to an exiting snapshot?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 3, 2019, 7:10pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/6 "2019-07-03T19:10:07Z")

</div>

Take a new snapshot with both indices and remove the old snapshot.  
If no changes happened in the first Index, it will just copy the data from the new index.

---

<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 31, 2019, 7:17pm UTC](https://discuss.elastic.co/t/s3-snapshot-backing-up-newly-made-indexes/188710/7 "2019-07-31T19:17:01Z")

</div>

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