# Elasticsearch Curator and Amazon S3 filename

**URL:** <https://discuss.elastic.co/t/elasticsearch-curator-and-amazon-s3-filename/100697>\
**Category:** Elasticsearch\
**Created:** [September 15, 2017, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-and-amazon-s3-filename/100697 "2017-09-15T14:40:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoponton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leoponton/32/19354_2.png) [@leoponton](https://discuss.elastic.co/u/leoponton)\
**Post date:** [September 15, 2017, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-and-amazon-s3-filename/100697/1 "2017-09-15T14:40:13Z")

</div>

I have seen the following closed topic: [https://discuss.elastic.co/t/curator-snapshot-and-s3-file-name/87185](https://discuss.elastic.co/t/curator-snapshot-and-s3-file-name/87185)

My use case is similar. Each day I snapshot the previous five days and push them to S3. The plan was to overwrite existing snapshots and fill in any gaps left by failures to ensure a continuous backup. Unfortunately the random naming scheme seemingly makes this impossible.

Perhaps I should be doing it more programmatically?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [September 15, 2017, 3:20pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-and-amazon-s3-filename/100697/2 "2017-09-15T15:20:45Z")

</div>

The only way to set and get names for snapshots is via the snapshot API. The file names do not correlate at all.

You also can't "overwrite" existing snapshots. You must understand that a snapshot is actually pointer metadata and segment files. When you initiate a snapshot, you're setting up a sequence of events (roughly this):

1. Identify all segments used by the indices selected for the snapshot
2. Stop background segment merges of identified segments
3. Check the remote repository to see if any of those segments have already been copied
4. Copy only _new_ segments to the repository
5. Update the snapshot metadata so that segments in use have a pointer reference.
6. Report snapshot completion (if successful)
7. Enable background segment merges of identified segments

This is why a snapshot isn't copying things to a particular file on the remote file system. It's also why you can't "overwrite" a snapshot. The snapshot is technically metadata, and segment files are the actual data.

---

<div class="post-metadata">

**Author:** ![leoponton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leoponton/32/19354_2.png) [@leoponton](https://discuss.elastic.co/u/leoponton)\
**Post date:** [September 18, 2017, 12:36pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-and-amazon-s3-filename/100697/3 "2017-09-18T12:36:51Z")

</div>

Thanks for clarifying that Aaron. I'll review my approach.

---

<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:** [October 16, 2017, 12:37pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-and-amazon-s3-filename/100697/4 "2017-10-16T12:37:02Z")

</div>

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