0

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?
1

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;
| improve this answer | |
  • OK, so I was able to validate my level 0 and my cumulative level 1 backups; but I'm still cloudy whether I can safely delete the differential level 1 backups taken between the level 0 and the cumulative level 1 backup. Is the only way to test is to copy my level 0 and cumulative level 1 backups to a different server and attempt to restore the database instance onto the different server from those files? – Mark Stewart Jun 22 '18 at 14:44
  • 1
    If you define a retention policy in RMAN via a command like CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS; then RMAN will purge data files that it doesn't need whenever it needs to recover that space. – CaM Jun 22 '18 at 15:06
  • 1
    @MarkStewart I just added more detail. It may help you? – CaM Jun 22 '18 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.