Include current controlfile in RMAN backupset

Make sure you have a backup of the controlfile stored with your backupsets instead of just relying on them being available in their default location.

I have a client that runs its backups with this script:

backup as compressed backupset incremental level 0 filesperset 1 section size 32g database tag plus archivelog tag ‘orcl_full’;backup current controlfile;

The client has the following settings for controlfile autobackups:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 32 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’;

Because they chose the default, the controlfile backups got written to the FRA location (db_recovery_file_dest) and are deleted from there after 32 days.

Well, the client wanted a restore from 36 days ago!  The backup files were available since they get backed up to tape every 30 days, but the controlfile backups were not available because by then, they had been aged out of the FRA!

The solution is to make sure there is a backup of the controlfile stored with the backup of the rest of the database.  Add include current controlfile to the backup database command

backup as compressed backupset incremental level 0 filesperset 1 section size 32g database include current controlfile plus archivelog tag ‘orcl_full’;

This way, a backup of the current controlfile gets included in the backupset.

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