RMAN validate incremental level 1 backups

oracle-12crman

I am somewhat new to RMAN, and have taken an Oracle class on it, but I am stumped on validating my backups when using level 0 and 1; in order to save space, I am considering doing a level 0 (full) incremental backup Sunday, level 1 differential backups Monday and Tuesday, and level 1 cumulative on Wednesday. Then leve1 1 differential backups Thursday and Friday, and level 1 cumulative on Saturday.

The thought was after a successful level 1 cumulative backup on Wednesday, I could delete the differential level 1 backups from Monday and Tuesday. So, on Wednesday, to verify before I do something drastic to test, I did a

RMAN> restore database validate;

And away it went, validating files; but it only looked at files from the level 0 Sunday backup.

I would have expected it to also validate at least the incremental level 1 backup from Wednesday.

So two questions:

  1. Is my strategy of deleting differential level 1 backups after a successful incremental level 1 backup valid?
  2. How can I test to ensure this is correct?

Best Answer

First, you need to discover which backup is your level 0 and your 1. Then you need to validate the level 0 and the level 1 backups, independently.

 LIST BACKUP SUMMARY;

From the list, find the key for your level 0 and your level 1 backups. Then validate them via:

 VALIDATE BACKUPSET 370, 412;

Substitute your key values in that. You can also add in the key values for archive log backups, if any.

See https://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsynta053.htm#RCMRF162 Example 2-157 Validating a Backup Set, for more details.


This is beyond the scope of your original question, but may be of benefit to you:

I run RMAN backup configuration scripts as part of my "new Oracle instance" checklist. That script looks like this:

run {
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
    configure compression algorithm 'MEDIUM' optimize for load false;
    configure device type disk backup type to compressed backupset;
    configure device type disk parallelism 2;  }

Then I do my backups via this, with either a level = 0 or a level = 1, depending on the day of the week:

backup device type disk incremental level = 0 section size 1g database plus archivelog tag 'level 0';
backup current controlfile tag='Controlfile Level 0';
backup spfile tag='SPFile Level 0';

I then do the following. Probably not necessary, but...

allocate channel for maintenance type disk;
backup validate check logical database archivelog all;

crosscheck archivelog all;
crosscheck backupset ;
crosscheck backup device type disk;
release channel;