Close

BACKUP_TYPE changes with 12c RMAN

I was working on a report from our RMAN catalog and found I was having trouble reconciling the data I found in RC_BACKUP_SET with what I was expecting to see. Furthermore I couldn’t find anything in the Reference Guide to adequately explain what I was seeing.

In particular I’ll reference the descriptions of the BACKUP_TYPE and INCREMENTAL_LEVEL columns.

BACKUP_TYPE VARCHAR2(1) The type of the backup: D (full backup or level 0 incremental), I (incremental level 1), L (archived redo log).
INCREMENTAL_LEVEL NUMBER The level of the incremental backup: NULL, 0, or 1.

Seems pretty simple, but below I have copied an excerpt of recent backup data for a single small db. Note the two highlighted rows.
 

BACKUP_TYPE INCREMENTAL_LEVEL START_TIME CONTROLFILE_INCLUDED
L   2018-07-19 15:40:18 NONE
D   2018-07-19 15:40:21 BACKUP
D
0
2018-07-19 16:20:49 NONE
D   2018-07-19 16:21:06 BACKUP
L   2018-07-19 16:40:12 NONE
D   2018-07-19 16:40:15 BACKUP
D   2018-07-19 19:15:20 NONE
D   2018-07-19 19:15:49 BACKUP
L   2018-07-19 19:45:11 NONE
L   2018-07-19 19:45:12 NONE
D   2018-07-19 19:45:44 BACKUP
I
0
2018-07-19 19:52:42 NONE
D   2018-07-19 19:52:58 BACKUP

I know what a “Full Backup” is and I know what a “Level-0 Incremental Backup” is. From the documentation I would expect a “Full Backup” to have a backup type of “D” and an incremental level of NULL. However, at 4:20pm, my backup showed up as a “D” but with an incremental level of 0. What does that mean?

And why just a few hours later do I have another Level-0 backup, but this time instead of “full (D)” it’s “incremental (I)?” The data doesn’t seem to be consistent.

After some searches via Google and some searching on MOS, I found an explanation.

It turns out the database was upgraded from 11g to 12cR2 that day. So, at 4:20 another DBA took a backup before beginning. Then a few hours later after the upgrade was complete, the DBA took another backup. In both cases, the DBA took a Level-0 Incremental backup. The difference in the backup data is not just in the RMAN catalog RC_BACKUP_SET but also in the database’s own local V$BACKUP_SET data.
And the cause is due to changes in RMAN itself with 12c.

In older versions of the database “D” meant an offline backup, or the backup of a controlfile or an spfile. But, strangely, “D” was also used for an Incremental backup if the increment level was 0. So “I” type was only used for Incremental Level-1 backups.

Now that the database is 12c, when the Incremental Level-0 backups occur, they are recorded with the “I” type instead of the 11g “D” type.

So there is both a functional change as well as a documentation quirk to be aware of. That little change in the flag, without any obvious change in the documentation caused me quite a bit of confusion. Hopefully this will clear up the problem for others.

For more information on the RMAN change, see MOS Doc ID 2219155.1

Leave a Reply