Backup Old data Instead of Deleting

Hi ,
We are having some important data in a particular index. But this index keep growing and Queries became slow. Is there anyway to keep only last 30 days of data and rest of the data move to snapshot in s3

This must happen every day so that index will have only the latest 30 days data and backup have all other datas which must not be deleted.

Thanks