# Snapshot/ restore retention in Elasticsearch

**URL:** <https://discuss.elastic.co/t/snapshot-restore-retention-in-elasticsearch/58606>\
**Category:** Elasticsearch\
**Created:** [August 22, 2016, 6:03pm UTC](https://discuss.elastic.co/t/snapshot-restore-retention-in-elasticsearch/58606 "2016-08-22T18:03:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newelasticuser](https://avatars.discourse-cdn.com/v4/letter/n/50afbb/32.png) [@newelasticuser](https://discuss.elastic.co/u/newelasticuser)\
**Post date:** [August 22, 2016, 6:03pm UTC](https://discuss.elastic.co/t/snapshot-restore-retention-in-elasticsearch/58606/1 "2016-08-22T18:03:58Z")

</div>

Have a requirement to retain the data upto 3 years. Currently using Elasticsearch 2.3 ,

1. How to restore the data for past two years to a new index but not restore current year? Can it be done through the SNAPSHOT and RESTORE api?
2. Also the current index should only have current year's data, is there a way to periodically delete all past year's data from searching and all the data deleted should be stored in the snapshot. Do I need to use curator or this can be done through SNAPSHOT api?

---

<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 5, 2017, 10:26pm UTC](https://discuss.elastic.co/t/snapshot-restore-retention-in-elasticsearch/58606/2 "2017-07-05T22:26:06Z")

</div>


