# How to Move the logs from Elasticsearch to Amazon time on weekly basis

**URL:** <https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083>\
**Category:** Elasticsearch\
**Created:** [January 14, 2019, 4:47am UTC](https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083 "2019-01-14T04:47:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadiesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sadiesh/32/38868_2.png) [@sadiesh](https://discuss.elastic.co/u/sadiesh)\
**Post date:** [January 14, 2019, 4:47am UTC](https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083/1 "2019-01-14T04:47:02Z")

</div>

I have to move my week older logs from Elasticsearch to s3 bucket . Please let me know how to do this ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 14, 2019, 6:25am UTC](https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083/2 "2019-01-14T06:25:40Z")

</div>

You can use the [snapshot and restore mechanism](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) to store old indices into S3 before you delete them from the cluster. This requires the [S3 repository plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3.html) to be installed.

---

<div class="post-metadata">

**Author:** ![sadiesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sadiesh/32/38868_2.png) [@sadiesh](https://discuss.elastic.co/u/sadiesh)\
**Post date:** [January 14, 2019, 8:15am UTC](https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083/3 "2019-01-14T08:15:40Z")

</div>

Thanks Christian. curator is available to automate restore mechanism from s3. Do we have any query basis trigger also available for the same ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 14, 2019, 8:16am UTC](https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083/4 "2019-01-14T08:16:46Z")

</div>

You can probably use [Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html) to automate this e.g. from a cron job.

---

<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:** [February 11, 2019, 8:16am UTC](https://discuss.elastic.co/t/how-to-move-the-logs-from-elasticsearch-to-amazon-time-on-weekly-basis/164083/5 "2019-02-11T08:16:53Z")

</div>

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