I've configured RMAN Incremental Backups on my Oracle 11gR2 test database machine running on windows environment. I've set retention policy to recovery window of 7 days. On Sunday I take level zero incremental backup as follows:
run {
HOST 'create_date_folder';
allocate channel ch1 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_0LVL_%d_s%s_p%p_t%t_%U';
allocate channel ch2 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_0LVL_%d_s%s_p%p_t%t_%U';
allocate channel ch3 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_0LVL_%d_s%s_p%p_t%t_%U';
BACKUP INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
release channel ch1;
release channel ch2;
release channel ch3;
}
On other week days I take level 1 cumulative incremental backup as follows:
run {
HOST 'create_date_folder';
allocate channel ch1 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_1LVL_%d_s%s_p%p_t%t_%U';
allocate channel ch2 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_1LVL_%d_s%s_p%p_t%t_%U';
allocate channel ch3 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_1LVL_%d_s%s_p%p_t%t_%U';
BACKUP INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET CUMULATIVE DATABASE PLUS ARCHIVELOG;
release channel ch1;
release channel ch2;
release channel ch3;
}
The problem that I'm facing is that despite of setting retention policy old backups (of more than two weeks) are not being considered as obsolete/expired by RMAN as they are not removed by executing delete obsolete command. And, second question is that how to restrict RMAN to not remove Oracle generated Archivelogs. Pl guide.