RMAN Functionality Question

From: Ruel, Chris <Chris.Ruel_at_lfg.com>
Date: Thu, 25 Aug 2016 18:27:25 +0000
Message-ID: <1AFD62082EEAF0448EF1815139687F1369B99DD1_at_NC2PWEX504.us.ad.lfg.com>



So, I have scoured documentation but before I deem this not possible, I thought I better ask the experts here. I have a specific RMAN backup issue I am trying to solve. I know I can get around it with a bit of clever shell scripting (which I already have), but, want I really want to know is if this functionality exists natively in RMAN commands.

My backup flow pretty much looks like this:

Sunday LEVEL0 including archivelogs to FRA

  • After backup to FRA completes, an SBT backup copies FRA backup pieces to tape with a command like:

backup backupset all;

  • After backup to SBT completes, I clean up any files from the prior week, or not needed for a COMPLETE recovery with:

delete noprompt obsolete redundancy 1 device type disk;

Monday LEVEL1 DIFFERENTIAL including archivelogs to FRA

  • All other commands above are the same

Tuesday LEVEL1 DIFFERENTIAL including archivelogs to FRA

  • All other commands above are the same

Wednesday LEVEL1 CUMULATIVE including archivelogs to FRA

  • All other commands above are the same

...and so on

So, what I want to happen, to save space, is for any LEVEL1 DIFFERENTIALS and archivelogs to get cleaned up out of the FRA after the SBT backup completes when they are no longer needed. So, the L1D's get cleaned up after the Wednesday L1C and the archive log backups get cleaned up after any backup. The end goal is to only have on disk enough backups to do a COMPLETE recovery. If I have to do incomplete, I can go to tape. That is a sacrifice we are making.

The problem I run into is that if for some reason the SBT backup fails, my archive logs or L1D's might still get deleted. This happened and has caused us some pain. I know, it was a bad design I did not see until it bit me.

What I really want, is to find out if RMAN has a way to check if SBT backups are available before I delete obsolete. I envision the command would look something like this:

delete obsolete redundancy 1 device type disk backed up 1 times to SBT;

I hope I explained this clearly enough. For now, I have simply coded into my shell script an exit code check before the delete runs. That should work ok, but, again, I was wondering if I am overlooking some built in feature to RMAN that would simplify things.

Thanks in advance,

Chris..



Chris Ruel * Oracle Database Administrator * Lincoln Financial Group cruel_at_lfg.com<mailto:cruel_at_lfg.com> * Desk:317.759.2172 * Cell 317.523.8482

Notice of Confidentiality: **This E-mail and any of its attachments may contain Lincoln National Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Lincoln National Corporation family of companies. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout. Thank You.**

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 25 2016 - 20:27:25 CEST

Original text of this message