RMAN not deleting backups according to retention policy
529403Aug 15 2007 — edited Aug 17 2007If have the rman configuration as follows:
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/app/oracle/backups/RMAN/TSTR/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/u03/app/oracle/backups/RMAN/TSTR/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024 M;
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/u03/app/oracle/backups/RMAN/TSTR/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024 M;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/flash_recovery_area/TSTR/snapcf_ev.f';
In testing the retention policy, I took backups for 3 consecutive days. The backup script I ran looks like this:
run {
crosscheck archivelog all;
crosscheck backupset;
report obsolete;
delete noprompt force obsolete;
}
However, the previous days backups were not deleted. I went into RMAN and issued a report obsolete command and it came back telling me there were no obsolete backups, but if I go into the directory where the backups are stored there are all 3 day's backups in the directory. Does anyone know why RMAN is not reporting the old backups as obsolete even though they are older than the retention policy states they should be kept?