A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

ARCHIVE AND OLD RMAN BACKUP REMOVAL

1 min read
RMAN> show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
RMAN> CONFIGURE RETENTION POLICY TO NONE;

The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many full or level 0 backups of each datafile and control file that RMAN should keep. 

In other words, if the number of full or level 0 backups for a specific datafile or control file exceeds the REDUNDANCY setting, then RMAN considers the extra backups as obsolete.
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;

RMAN> report obsolete;
RMAN> delete obsolete;

RMAN> crosscheck backup;
RMAN> list backup;
RMAN> list backup summary;

***************************FOR ARCHIVELOG******************************

list archivelog all;

RMAN> crosscheck archivelog all;
RMAN> backup archivelog all delete input;
RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE "sysdate-1";    //delete archivelog a day before

RMAN>DELETE ARCHIVELOG ALL BACKED UP 2 TIMES to disk;
RMAN>DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 3790;

[oracle@Anish trace]$ df -h
Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root          57G   46G  8.0G  86% /