# How to back monthly indices with curator day to day?

**URL:** <https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367>\
**Category:** Elasticsearch\
**Created:** [August 29, 2019, 2:44pm UTC](https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367 "2019-08-29T14:44:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [August 29, 2019, 2:44pm UTC](https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367/1 "2019-08-29T14:44:18Z")

</div>

Hi running Curator 5.1 and Elasticsearch 6.4.2

I have the following Curator action... Which works. My concern is how do I catch the last day of the month?

So on September 1st I would need to make sure the last bit of August gets backed up...

```
actions:
  6:
    action: snapshot
    description: Daily raange backups.
    options:
      repository: s3-repository
      name: test-%Y.%m.%d
      wait_for_completion: True
      max_wait: 1200
      wait_interval: 10
      ignore_unavailable: True
      include_global_state: True
      partial: False
      skip_repo_fs_check: False
    filters:
    - filtertype: pattern
      kind: regex
      value: '^(.*-prod-xxxxxx-).*$'
    - filtertype: period
      period_type: relative
      source: name
      range_from: 0
      range_to: 0
      timestring: '%Y.%m'
      unit: months
```

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [August 29, 2019, 2:49pm UTC](https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367/2 "2019-08-29T14:49:54Z")

</div>

Should I just put...

> range\_from: -1  
> range\_to: 0

Which will index the previous month once and then subsequently only the current month will be indexed because it's the only one that changed?

---

<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:** [August 29, 2019, 7:29pm UTC](https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367/3 "2019-08-29T19:29:59Z")

</div>

The easiest way to see is to set that and test with the `--dry-run` flag. It will not do the actions, but will show you what it _would_ have done.

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [September 5, 2019, 3:16pm UTC](https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367/4 "2019-09-05T15:16:30Z")

</div>

So, putting

> from: -1 to: 0

captures the previous month and current month. This means that on daily backups it will backup the previous month and current month every day.

Since snapshots track the differences and not everything get's backed up, I guess I can live with it.

---

<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 3, 2019, 3:28pm UTC](https://discuss.elastic.co/t/how-to-back-monthly-indices-with-curator-day-to-day/197367/5 "2019-10-03T15:28:35Z")

</div>

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