Solved

MS SQL TRANS Log Retention.

  • 2 April 2021
  • 6 replies
  • 1070 views

Userlevel 2
Badge +8

Wondering how can I set a specific time for TRANS logs to expire.   I dont see where I can set a specific RETENTION for the TRANS logs backup schedule.  

I notice on a FULL Schedule for SQL or for Windows File systems  when you click the “Advance” button on the bottom of the “Schedule Pattern” tab that there is a “Media” tab on the “Advance backup options” and you can set job retentions etc…   For a TRANS schedule the media Tab doesnt offer that??

Thanks

BC

 

icon

Best answer by euMike 2 April 2021, 22:11

View original

6 replies

Userlevel 4
Badge +10

Retention is determined by storage policy. In order to have different retention for log backups you will need to configure log storage policy:

  1. create a new storage policy for log backup with new retention
  2. associate that storage policy with you existing (data) storage policy
    https://documentation.commvault.com/commvault/v11/article?p=13810.htm#o114632
  3. your next tlog backup will automatically use that log storage policy. Data backups will still use you existing (data) storage policy
Userlevel 2
Badge +8

Hey euMike - Thanks for the reply…

 

Thats what I was thinking  -  Retention is set on the Storage Policy by default..  So what does Commvault give you the option on other backup schedules - FULL, DIFF to either use Storage policy retention (i think is default) or select # of Days etc..

Didnt know if there was a setting that I missing etc…   So commvault best practice is to have a seperate Storage policy for MS SQL Trans logs when wanting to use a different retention then the main Storage policy.  

We ave everything on AWS so I guess we would need to spin up another S3 bucket or I need to go back to my notes on how to use a portion of the existing S3 for a different Storage Policy for TRANS

Badge

Hey 

I’m just working on a similar question. We already have a different Storage Policy and Schedule for MS SQL Transaction Logs. Based on the advice of our local Commvault Partner we only have a incremental schedule running. I now realized that it does no aging of the data, it keeps everything.

What is the best practice to clean up? Running a Synthetic Full every xx days or what would you recommend @euMike ?

Many thanks

Userlevel 5
Badge +13

Hi @Simon you need to run a full to create new cycle, there is no option of Synthetic Full for SQL agent.

 

@bc1410 There is no need to create another S3 bucket, the log storage policy created can be used using the same data path (same Media Agent and Cloud library). In fact, when you define global deduplicated storage policy AKA Storage Pools, all the standard storage policies associated to a specific global deduplicated storage policy, use the same data path and deduplication database.

Userlevel 2
Badge +5

 

You will also need to consider a trip into the Control Panel → Data Ageing section and review/flip the following parameter “Prune All Database Agent Logs Only By Days Retention Rule”. As described here: https://documentation.commvault.com/commvault/v11_sp20/article?p=11019.htm
 
 

 

Userlevel 2
Badge +8

Very late in getting back to this - Thanks Everone for the replies..

 

So best to create a new storage policy for sql trans logs and also  @Ross take a trip to the control panel to ajust the Prune All Database Agent Logs Only By Days Retention Rule…  

 

Thanks

Reply