we have diffrenet policy for database and its logs , storage policy retention are diffrenet for log is 1 day and db its 14 days , however logs are not getting pruned and when running the forcast report the DB backup job needs the logs
is it expected ?
Best answer by Sunil
Yes. Or use the below setting in Control Panel → Media Management Configuration → Data Aging
Prune All Database Agent Logs Only By Days Retention Rule → Set this to 1
I see you tagged Oracle and MS SQL to your post, but I’d still like to ask if your question is specific to these databases or in general?
Let me try to answer anyway.
As long as the data backups are retained on the basic retention, we don’t prune the log backups as long as the data backups are retained (Regardless of the retention configured on the log storage policy). These are linked by log rule. This is required to be able to do Point-in-time recoveries of the DBs.
If the data job is full and is retained by extended retention, we keep the log backups which are linked to the data backup jobs. (These linked jobs are usually the log backups that run at the same time as the data backup). This is required to make sure the data backup recoverable and the DB is recovered to a consistent state.
All the log backups are needed for point-in-time recovery.
For example, you ran a database backup at 8 AM and running log backups hourly. If you need to recovery the database till 10:30 AM, you will need 8 AM database backup + 9 AM log backup + 10 AM log backup + 11 AM log backup to be able to roll forward to 10:30 AM.
In this case, you need to configure basic retention only for the period you need PIT restores for. And for the rest, retain by extended retention.
Please do keep in mind, when you configure extended retention only the full backups (and linked log backups) will be retained not the complete cycle.
Be cautious when changing the basic retention from a longer period to shorter period, as this action will impact not only future backups but already run backups also and can prune whichever job qualifies per new retention criteria.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.