kopia icon indicating copy to clipboard operation
kopia copied to clipboard

I cannot get my head around retention policy...

Open danmed opened this issue 2 years ago • 2 comments

I want to have a snapshot run once a day the below retention policy

1 snapshot per day for 7 days 1 snapshot per week for 4 weeks 1 snapshot per month for 12 months 1 snapshot yearly

Can someone tell me how to achieve that with the kopia retention policies?

I have it set like the below image.. but the hourly images are confusing me.. also i only seem to be able to select 12 hours for the schedule.. i'd like 24 hours.

image

danmed avatar Sep 14 '22 21:09 danmed

Hi, welcome to this project. Github should be used for actual issues, other than questions & answers like above. Please use the forum in the future: https://kopia.discourse.group/ where you will find all of this documented already and more.

To answer your question for now, If I am not mistaken, you do not even have to change anything as the default policy would handle these use cases. In fact, it exceeds your requirements since it keeps 48 hourly backups, 7 daily, 4 weekly, 24 monthly and 3 annual.

But specifically, if you want to fine tune, you can change it to:

Having 7 in daily will perform what you want to achieve, which is keep 1 snapshot per day for 7 days. Having 4 in weekly will perform what you want to achieve, which is keep 1 snapshot per week for 4 weeks Having 12 in monthly will perform what you want to achieve, which is to keep 1 snapshot per month for 12 months.

The key with kopia is to schedule it to run as often as you can, so it snapshots as often as it can and will maintain the tags per the policy. I.e. schedule it hourly and it will clean up what it needs. No need to "schedule it daily", you could technically run it every hour and it would keep "1 daily" snapshot for 7 days per above.

xxxliqu1dxxx avatar Sep 14 '22 22:09 xxxliqu1dxxx

Thankyou for your reply.. and apologies for posting in the wrong place.. i'll set things back to the default and just see hwo things go.

danmed avatar Sep 14 '22 23:09 danmed

This was reported as answered on Kopia Slack. I am closing this out but please feel free to reopen if needed.

ntolia avatar Mar 23 '23 06:03 ntolia