Oracle: Recovery Manager

  • user notice: The _custom_breadcrumbs_get_breadcrumb() function called token replacement with an array rather than a string for $text in /mnt/webc/60/17/52309417/htdocs/drupal/sites/all/modules/token/token.module on line 263.
  • user notice: The _custom_breadcrumbs_get_breadcrumb() function called token replacement with an array rather than a string for $text in /mnt/webc/60/17/52309417/htdocs/drupal/sites/all/modules/token/token.module on line 263.

Start Recovery Manager

rman target /

Delete Archive Logs

Delete all archive logs but keep the last 45 days:

DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -45';

To remove archive logs older than 3 days without prompting, e.g. via cron, after backup run:

DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -45';

A sample script could be (deleting all logs except the last three days):

#!/bin/bash
 
. ${HOME}/.profile
 
rman target / << __EOF__
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -3';
EXIT
__EOF__