Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retention of old backups #42

Open
nbokkisam opened this issue Jan 21, 2018 · 3 comments
Open

Retention of old backups #42

nbokkisam opened this issue Jan 21, 2018 · 3 comments

Comments

@nbokkisam
Copy link

nbokkisam commented Jan 21, 2018

I know the config allows no of days to retain daily backups. There are parameters for weekly, monthly and I believe the weekly, monthly backup options are not developed yet(According to config file comments).

Is it possible to offer retention of old backups based on grandfather-father-son schedule( https://en.wikipedia.org/wiki/Backup_rotation_scheme#Grandfather-father-son)?
You can refer to this repository where similar functionality is implemented using PHP. https://github.com/ianneub/php_backup_s3

Something like below
Everyday for the past two weeks (14 backups)
Every Saturday for the past 2 months (8 or 9 backups)
First day of the month going back forever

Thanks.

@dotmanila
Copy link
Owner

@nbokkisam The code is actually there, beta quality I suppose and needs some real world testing. In brief this is how it works.

  • Take backups daily
  • On sunday, rotates the oldest backup as weekly
  • On the same Sunday, if oldest backup was taken on the last week of the month, it is also rotated to monthly.

Monthly backups are not based on absolute dates.

Please test and let me know if you encounter problems. I know I need some unit tests on these, but bug reports help prioritize any major issues.

@nbokkisam
Copy link
Author

@dotmanila Thanks for the reply. I can help you testing. Can you please let me know the config values I should maintain for testing weekly & monthly backups archiving. Thank You for this great tool.

How many sets of full + incrementals to keep in stor

retention_sets = 2

How many archived weekly backups are kept, unused for now

retention_weeks = 0

How many archived monthly backups are kept, unused for now

retention_months = 0

@dotmanila
Copy link
Owner

@nbokkisam

retention_sets is how many backup sets you want to keep. If you have full + incremental, how many of these combinations you want to retain.

retention weeks, how many backups you want to keep that is taken on Sundays. If the Sunday backup is incremental, it will include its full backup as well. I suggest begin with 2.

Same for retention months - if you want to backups every 4 weeks going back to forever, you may want to set this to a very high number i.e. 99999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants