# Hello. I need to implement an archival method in opensearch where specific days data can be purged from live database and stored in backup drive and when needed can be restored back in the live database

**URL:** <https://forum.opensearch.org/t/hello-i-need-to-implement-an-archival-method-in-opensearch-where-specific-days-data-can-be-purged-from-live-database-and-stored-in-backup-drive-and-when-needed-can-be-restored-back-in-the-live-database/15028>\
**Category:** DevOps\
**Created:** [July 10, 2023, 10:18am UTC](https://forum.opensearch.org/t/hello-i-need-to-implement-an-archival-method-in-opensearch-where-specific-days-data-can-be-purged-from-live-database-and-stored-in-backup-drive-and-when-needed-can-be-restored-back-in-the-live-database/15028 "2023-07-10T10:18:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muzammil](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Muzammil](https://forum.opensearch.org/u/Muzammil)\
**Post date:** [July 10, 2023, 10:18am UTC](https://forum.opensearch.org/t/hello-i-need-to-implement-an-archival-method-in-opensearch-where-specific-days-data-can-be-purged-from-live-database-and-stored-in-backup-drive-and-when-needed-can-be-restored-back-in-the-live-database/15028/1 "2023-07-10T10:18:28Z")

</div>

Hello. I need to implement an archival method in opensearch where specific days data can be purged from live database and stored in backup drive and when needed can be restored back in the live database

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [July 11, 2023, 5:35am UTC](https://forum.opensearch.org/t/hello-i-need-to-implement-an-archival-method-in-opensearch-where-specific-days-data-can-be-purged-from-live-database-and-stored-in-backup-drive-and-when-needed-can-be-restored-back-in-the-live-database/15028/2 "2023-07-11T05:35:06Z")

</div>

Index state management policy can solve your problem, you can define a policy with snapshot action and delete action, when a index becomes old, take a snapshot to store it in S3, then after specific days, delete it. If you want to retrieve the index, you can restore it from S3. You can take a look at this: [Policies - OpenSearch documentation](https://opensearch.org/docs/latest/im-plugin/ism/policies/#snapshot).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [September 9, 2023, 5:35am UTC](https://forum.opensearch.org/t/hello-i-need-to-implement-an-archival-method-in-opensearch-where-specific-days-data-can-be-purged-from-live-database-and-stored-in-backup-drive-and-when-needed-can-be-restored-back-in-the-live-database/15028/3 "2023-09-09T05:35:44Z")

</div>

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