Incremental level 1 backup with no Incremental level 0

backuporaclerman

I have done the following steps:

  1. Backed up database with INCREMENTAL LEVEL 0
  2. Delete INCREMENTAL LEVEL 0 backup without telling controlfile. So deleted it by hand. And did not make crosscheck.

  3. Backed up database with INCREMENTAL LEVEL 1(without making crosscheck). How surprising it may be, log showed me that INCREMENTAL LEVEL 1 was successfully done.

Note, I have no INCREMENTAL LEVEL 0 backup, but controlfile doesn't know it. I have just INCREMENTAL LEVEL 1.

I tried to restore database with this backup but of course couldn't. It was telling me that no backup of datafile 1-5 found…

If controlfile had known about EXPIRED backups , then INCREMENTAL LEVEL 1 backup first would do INCREMENTAL LEVEL 0 and after-that INCREMENTAL LEVEL 1.

How to avoid this situation. Do I have to use chrosscheck in my backup script? Or set recovery window in RMAN?

I have Oracle 11g database.
Backup is taken by Netbackup Server. So Netbackup deletes backups itself by its retention.
RMAN retention policy is configured to REDUNDANCY 2.

Please, Advice me.

Best Answer

Yes, if you want to prevent a level 1 from being created without a corresponding level 0 being available, then you need to do a crosscheck in the script so RMAN knows that the level 0 is not available.

Prior to 10g (or with compatibility < 10.0) Oracle would do a level 0 when a level 1 was done without a level 0. Since you are on 11g, I would expect your compatibility to be >=10.0, so RMAN "copies all blocks that have been changed since the file was created". This behavior seems to have changed between versions and there is some confusion as to what the current behavior is, but your findings are consistent with the documentation.