Obsolete backup Not getting delete [message #584633] |
Thu, 16 May 2013 08:00 |
|
Dear All,
Please note in our database we changed RMAN backup to redundancy 7.
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 7;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_mscmada.f'; # default
Also we have scheduled in our dailly backup to delete obsolete backup means to delete backup which completed more that 7 times, but when we check our backup still in our disk for 1 Month.Note we have scheduled to delete obsolete backup dailly.
Regards,
Anil
|
|
|
|
Re: Obsolete backup Not getting delete [message #584643 is a reply to message #584640] |
Thu, 16 May 2013 08:56 |
|
Hi Michel,
Please note i have set my retention Policy to REDUNDANCY 7,Means my backup will become obsolete if i run backup more than 7 times,But in my case i schduled backup to take Level0 in sunday and level1 backup from mon-Sat in my script,in both level0 and level1 backup i gave to delete obsolete backup.But when i check database backup status after 1 month my old backup not yet deleted.Please find Level0 and Level1 script for reference.
Level0
run
{
allocate channel d1 type disk;
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
backup AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 format '/u02/RMAN/db_%t_%s_p%p' database;
sql 'alter system archive log current';
sql 'alter system archive log current';
backup AS COMPRESSED BACKUPSET archivelog all format '/u02/RMAN/al_%t_%s_p%p' delete all input;
delete noprompt obsolete;
backup AS COMPRESSED BACKUPSET current controlfile tag =cf1 format '/u02/RMAN/cf_%t_%s_p%p';
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
}
exit;
EOF
Level1
wxrwxrwx 1 oracle dba 1.7K May 16 01:24 backuplevel1.log
-rw-r--r-- 1 oracle dba 75 May 16 13:25 offexit.lst
[oracle@mgtnr-srv-ora01 RMAN]$ cat rman_level1.sh
#!/bin/bash
export ORACLE_SID=mscmada
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
cd /u01/app/oracle/product/10.2.0/db_1/bin
./rman target 'system/idiboxmsc' log=/u02/RMAN/rmanlog1.`date '+%a'` <<EOF
run
{
allocate channel d1 type disk;
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
backup AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 1 format '/u02/RMAN/db_%t_%s_p%p' database;
sql 'alter system archive log current';
sql 'alter system archive log current';
backup AS COMPRESSED BACKUPSET archivelog all format '/u02/RMAN/al_%t_%s_p%p' delete all input;
delete noprompt obsolete;
backup AS COMPRESSED BACKUPSET current controlfile tag =cf1 format '/u02/RMAN/cf_%t_%s_p%p';
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
}
exit;
EOF
Regards,
Anil
|
|
|
|
|