Solved

Allow RMAN pruning old backups

  • 18 August 2022
  • 2 replies
  • 659 views

Userlevel 4
Badge +13

Hi,

I want to set a storage policy (a plan actually) for Oracle backups. The only thing is customer wants to just provide storage target for RMAN backups but leave actual backup administration in hands of Oracle admins. Oracle team won’t have access to Commvault console, so they need to manage backups with the only tool they know and got which is RMAN. Everything is set, we got plan in place, activity on default and archivelog subclients is disabled, so Commvault won’t run any backups (a plan without scheduler would be nice!), we did some tests and backups work like a charm and the only missing part is data aging. For this setup to work nicely and to give Oracle team what’s theirs I also need to allow them to prune old backups using RMAN so I could set infinite retention on Commvault side (currently it’s 14 days). I’ve set DisableRMANPruning to 0 on Commserve computer and crossed my fingers but unfortunately it is not enough. After running a couple of backups using RMAN command line we can see that RMAN is removing obsolete backup pieces just fine, however nothing has been aged from the Commvault side. RMAN redundancy is set to 1, so after successful backup I should have 1 job in storage policy copy, but currently I have 10.

 

Any ideas if I missed something or is there any other Additional settings I should set?

 

Summary

Commserve\Additional Settings\DisableRMANPruning = 0

RMAN redundancy = 1

Retention on storage policy copy = 14 days

 

CS Additional settings:

https://documentation.commvault.com/additionalsetting/details?name=%22DisableRMANPruning%22&id=2475

 

RMAN log fragment:

Finished backup at 18-AUG-22

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           3499   18-AUG-22         
  Backup Piece       3499   18-AUG-22          QTEST_DATABASE-18-20220818_dq15fsh4_1_1.BCP
Backup Set           3501   18-AUG-22         
  Backup Piece       3501   18-AUG-22          QTEST_CONTROLFILE-18-20220818_ds15fsp6_1_1.BCP
Backup Set           3502   18-AUG-22         
  Backup Piece       3502   18-AUG-22          QTEST_SPFILE-18-20220818_dt15fsp8_1_1.BCP
Backup Set           3504   18-AUG-22         
  Backup Piece       3504   18-AUG-22          QTEST_DATABASE-18-20220818_dv15fu27_1_1.BCP
deleted backup piece
backup piece handle=QTEST_DATABASE-18-20220818_dq15fsh4_1_1.BCP RECID=3499 STAMP=1113059876
deleted backup piece
backup piece handle=QTEST_CONTROLFILE-18-20220818_ds15fsp6_1_1.BCP RECID=3501 STAMP=1113060135
deleted backup piece
backup piece handle=QTEST_SPFILE-18-20220818_dt15fsp8_1_1.BCP RECID=3502 STAMP=1113060136
deleted backup piece
backup piece handle=QTEST_DATABASE-18-20220818_dv15fu27_1_1.BCP RECID=3504 STAMP=1113061448
Deleted 4 objects


released channel: ch1

 

Storage Policy copy jobs

 

Cheers,

Robert

icon

Best answer by Sunil 18 August 2022, 18:13

View original

2 replies

Userlevel 5
Badge +13

Hi @Robert Horowski 

Please try the “Disable RMAN External Pruning” option in Media Management configuration parameters.

https://documentation.commvault.com/2022e/expert/11019_media_management_configuration_data_aging.html

Disable RMAN External Pruning

Definition: You can use this configuration parameter to disable the deletion of the archive files when you use external RMAN scripts to clean up the backup pieces.

Default Value:  1

Range: 0 or 1

Usage: The RMAN external pruning feature is disabled when this parameter is set to 1.

 

 

Thanks,

Sunil-

 

Userlevel 4
Badge +13

Hi @Sunil 

I tried to disable additional setting and configure the  “Disable RMAN External Pruning” option in Media Management configuration parameters and it didn’t work, BUT when I enabled the additional setting again with  “Disable RMAN External Pruning” option in Media Management set to 0 that did the trick and now I can see backups are aged using RMAN scripts. It looks like both options must be used for it to work (11.28.14)

You just saved me a support incident 😀

Thanks!

Robert

Reply