Friday, April 27, 2012

Archival Backup


Archival Backup

Archival backup is a new RMAN feature in Oracle 11g, which allows to create a backup that will not be affected by the normal retention policy defined for backups taken using RMAN.

-- This backup consists of every datafile, controlfile, server parameter file needed for restore and recovery in a single disk or tape
-- It also automatically generates archive log backup to ensure the consistency of backup
-- Automatic archive log backup ensures database can be restored and recoverd to a consistent state.
-- Overrides the existing backup retention policy.
-- These backups can be kept for upto a certain date or forever.
-- The existing full database backup can be modified to be made Archival backup by simple commands.
-- This can be implemented by using KEEP FOREVER caluse (requires a recovery catalog) or KEEP UNTIL TIME caluse of backup command.
-- It will not be listed as obsolete through RMAN reporting commands.
-- Purpose of these kinds of backup could be business policy or legal.
-- The backup should be in non_FRA area, Flash Recovery Area cannot be used to keep the backup because retention policy applies to FRA. It will give ORA-19811 error

Such backups once created may be exempted from the normal backup and recovery strategy.

These backups may be created on separate backup media other than the flash recovery area to be retained for a long time. These kinds of backups may require to be maintained for business or legal requirements. They will not be displayed when you view the obsolete backups based on your retention policy.

This backup is "all-inclusive" and every datafile of the database, control file, server parameter file needed for restore and recovery is backed up to a single disk or tape device. It also automatically generates an archive redo log backup to ensue that the database backup can be recovered to a consistent state. Typically these backups are done to tape.

An archival backup are created with the BACKUP…KEEP command. The KEEP option indicates that the backupset should be exempt from the retention policy either forever (KEEP FOREVER clause) or for a specified time period (KEEP UNTIL TIME). The KEEP FOREVER clause requires the use of a recovery catalog database.

The RMAN command for archival backup:

KEEP {FOREVER| UNTIL TIME 'SYSDATE +n'}
         RESTORE POINT restore_point_name

where the restore point is a user-defined name associated with an SCN of the database corresponding to the time of the creation of the restore point. The restore point would act as a label for the SCN to which the backup must be recovered to be made consistent. The restore point option is not allowed with the CHANGE…KEEP command described later.

Example:

RMAN> BACKUP TAG FORBKP
           DATABASE KEEP FOREVER;

RMAN>BACKUP DATABASE
          FORMAT '<path>/%U.bkp'
          KEEP UNTIL TIME 'sysdate + 365';

The CHANGE command and archival backups :

The CHANGE... NOKEEP may be used to remove the KEEP attributes of a backup, making it subject to the backup retention policy.

The CHANGE…KEEP command may be used to change a consistent backup into an archival backup.

Example:

RMAN> CHANGE BACKUP TAG 'fulldb_backup' KEEP FOREVER;

Archival Backups may be created using Enterprise Manager:

Database Control Home Page
-> Availability tab
-> Schedule Backup
-> Schedule Customized Backup (Wizard)
-> Setting Page
-> Override Current Settings Button
-> Policy
-> Over Retention Policy Section
-> Select to keep a backup for a specified number of days.

No comments:

Post a Comment