Different RMAN Retention Policies for DISK and TAPE

Short note for myself on how to implement different RMAN Retention policies for DISK and TAPE backups in the same configuration.

The goal is to have:

  • Retention for DISK backups as 7 Days;
  • Retention for TAPE backups as 60 Days;

Implementation:

  • set policy for TAPE as RMAN CONFIGURATION
    • CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 60 DAYS;
  • for deletion of OBSOLETE backups use next commands as a single block:
    • DELETE OBSOLETE DEVICE TYPE  TAPE;
    • DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS DEVICE TYPE DISK ;

Setup TEST Environment, even without Tape Device present:

  • mkdir -p /tmp/rman/disk
  • mkdir -p /tmp/rman/sbt
  • RMAN>
    • CONFIGURE DEFAULT DEVICE TYPE TO disk;
    • CONFIGURE DEVICE TYPE sbt PARALLELISM 4;
    • CONFIGURE CHANNEL DEVICE TYPE sbt PARMS=’SBT_LIBRARY=oracle.disksbt, ENV=(BACKUP_DIR=/tmp/rman/sbt)’;
    • CONFIGURE DEVICE TYPE disk PARALLELISM 4;
    • CONFIGURE CHANNEL DEVICE TYPE disk FORMAT=’/tmp/rman/disk/%U’;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s