Rman 11gR2 changes tag labeling of the inc backup in incrementally updated backups

0

In (rman) incrementally updated backups, only incremental backups are done after the first full backup to the Fast Recovery Area. From 11gR2 on the incremental backup pieces will get the same tag as the datafile copies, and that’s actually different behaviour from pre- 11gR2 versions of the database. I stumbled on this different behaviour when a backup script, that worked perfectly on 11gR2, got ported to 10gR2 and 11gR1 ( 11.1.7 ). The script contains a system cleanup of all incrementals, done before a certain date, specifying the tag of the copy [ ‘COPY_DATABASE’ ]. On 11gR2 the inc1 backups got deleted fine, but the delete on 10gR2 and 11gR1 just wouldn’t work.

By checking v$backup_piece…

select distinct tag
from v$backup_piece
where instr(tag,'TAG')=0;

…and getting no result, it became clear that the tag of the copy datafiles, was’t also the tag of the incrementals.

Once I knew, it was easy to correct the problem. I just added the tag of my copy datafiles to the incremental backup, and that did the trick. All incrementals that were supposed to get cleared from the pre-11gR2 system, were deleted. The incrementals without tag, already on the system, were deleted manually.

My original 11gR2 incremental backup, and delete:

run{
allocate channel d1 device type disk;
backup
filesperset 8
incremental level 1
for recover of copy with tag 'COPY_DATABASE' database;
release channel d1;
}

run {
allocate channel d2 device type disk;
delete noprompt
backupset
tag 'COPY_DATABASE'
completed before 'trunc(sysdate-7)';
release channel d2;
}

The pre-11gR2 version of the incremental backup.. the delete hasn’t changed:

run{
allocate channel d1 device type disk;
backup
filesperset 8
incremental level 1
tag 'COPY_DATABASE'
for recover of copy with tag 'COPY_DATABASE' database;
release channel d1;
}
Share.

About Author

Harry Dragstra is Senior Oracle DBA. He is specialized in Oracle RAC, Oracle Virtualization, and has a a strong interest in APEX development and PL/SQL.

Leave a Reply