I want to apply some more advanced lifecycle policies on my GCP Storage Bucket to meet some imposed requirements.
An application performs hourly backups which are stored in a GCP Storage Bucket as "app_name_timestamp". I want to optimize the number of backup files stored in the bucket, by applying policies in accordance with the following requirements:
keep the Hourly backup files for 7 Days,
keep the Daily backup files for 3 weeks,
keep the Weekly backup files for 2 months,
keep the Monthly backup files for 1 year.
Too meet the first requirement, I can use the lifecycle rule to move the backup files to a different storage class based on the "Age" condition. But, is there an option to incorporate the remaining rules, having in mind the possibility to move them between different storage classes? My main problem is to figure out how to leave one copy from the Hourly backup as the Daily one.
If someone would throw me a bone here, I would really appreciate it.
Thanks in advance!