sql-server-maintenance-solution icon indicating copy to clipboard operation
sql-server-maintenance-solution copied to clipboard

Scheduling yearly, quarterly, monthly backups, and their different retention times

Open dalekerr opened this issue 5 years ago • 1 comments

I have a WEEKLY schedule for FULL backups of USER databases with a cleanup time of 680 hours (28 days), and these run on the first Sunday of each week. I do not have anything more than a month old and I'm not happy with that. I have struggled to find a way to have complete flexibility with DatabaseBackup and the SQL job scheduler. Sure I could have a separate MONTHLY job, but how do I schedule the weekly job to not run on the same weekend as the monthly job? Same with a separate QUARTERLY job, how do I schedule the monthly job to not run in Jan, Apr, Jul and Oct?

Ideally I would like a weekly job to run and for the retention to be dependent on what month of the year it is and what week of the month it is. For example, how can I schedule to keep 2 quarterly backups, 2 monthly backups and 3 weekly backups?

dalekerr avatar Jun 06 '20 08:06 dalekerr

Are you trying to backup the same database weekly, monthly, and quarterly? And then have different retention periods for each? If so, to what end? Why have those different backups?

On Sat, Jun 6, 2020, 3:57 AM dalekerr [email protected] wrote:

I have a WEEKLY schedule for FULL backups of USER databases with a cleanup time of 680 hours (28 days), and these run on the first Sunday of each week. I do not have anything more than a month old and I'm not happy with that. I have struggled to find a way to have complete flexibility with DatabaseBackup and the SQL job scheduler. Sure I could have a separate MONTHLY job, but how do I schedule the weekly job to not run on the same weekend as the monthly job? Same with a separate QUARTERLY job, how do I schedule the monthly job to not run in Jan, Apr, Jul and Oct?

Ideally I would like a weekly job to run and for the retention to be dependent on what month of the year it is and what week of the month it is. For example, how can I schedule to keep 2 quarterly backups, 2 monthly backups and 3 weekly backups?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/olahallengren/sql-server-maintenance-solution/issues/393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHMK7LB4YMI7FJBPYXNLNTRVIAIZANCNFSM4NVYVWBA .

ChrisWoods1977 avatar Jun 06 '20 13:06 ChrisWoods1977