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:
- Is my strategy of deleting differential level 1 backups after a successful incremental level 1 backup valid?
- 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.
From the list, find the key for your level 0 and your level 1 backups. Then validate them via:
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:
Then I do my backups via this, with either a
level = 0
or alevel = 1
, depending on the day of the week:I then do the following. Probably not necessary, but...