removing old un-necessary archivelog from fast_recovery_area

of course you had better be certain you don’t need the archivelog BEFORE you remove it, you can put it back if you have a copy – you would just have to do another rman crosscheck (see below) to tell rman it is back

Archivelog sub-directories are typically of the form:

YYYY_MM_DD

and contain archivelog.

The following command will remove sub-directories and the archivelogs in them older that 14 days

/bin/find /u01/app/oracle/fast_recovery_area/PROD/archivelog -type d -mtime +14 | xargs rm -rf
# another alternative is:
/bin/find /u01/app/oracle/fast_recovery_area/PROD/archivelog -type d -mtime +14 -exec rm -rm {} \;
# the 2nd version above gives an error at the end of the command but does remove the folder and it's contents

Of course if you want RMAN to know about this you have to tell rman by doing this:

rman target /
crosscheck archivelog all;
delete noprompt expired archivelog all;

Leave a Comment

Scroll to Top