How To Create Long Term (Archival) Backups With 11g

How To Create Long Term (Archival) Backups With 11g

Explain 11g new features for improved handling of long term backups.

SOLUTION

In versions previous to 11g you could create an archival backup using the KEEP option, but if you performed this backup with the LOGS option all subsequent archivelog files had to be retained until the specified backup was deleted or expired. 
The LOGS and NOLOGS keywords have been deprecated in 11g.  Therefore the necessity to keep all subsequent archivelog files for the life of the KEEP backup has been removed.
In addition, a "restore point", a user-defined name associated with an SCN of the database corresponding to the time of the creation of the restore point, may be used with the KEEP option.  For example:
BACKUP DATABASE
  FORMAT '/backup/%U'
  TAG quarterly
  KEEP UNTIL TIME 'SYSDATE + 365'
  RESTORE POINT Q4FY07;




Improved handling of long-term backups

You can create a long-term or archival backup with BACKUP ... KEEP that retains only the archived log files needed to make the backup consistent.

Prior to Oracle Database 11g, if you needed to preserve an online backup for a specified amount of time, RMAN assumed you might want to perform point-in-time recovery for any time within that period and RMAN retained all the archived logs for that time period unless you specified NOLOGS. However, you may have a requirement to simply keep the backup (and what is necessary to keep it consistent and recoverable) for a specified amount of time.

From oracle 11g for the backup with keep option,RMAN includes the data files, archived log files (only those needed to recover an online backup), the relevant autobackup files, and spfiles. All these files must go to the same media family (or group of tapes) and have the same KEEP attributes.

The archival backup provides the RESTORE POINT clause which creates a œconsistency point in the control file. It assigns a name to a specific SCN. The SCN is captured just after the data-file backup completes. The archival backup can be restored and recovered for this point in time, enabling the database to be opened. In contrast, the UNTIL TIME clause specifies the date until which the backup must be kept.
Example
======
RMAN> backup database
2> tag monthly_backup
3> format 'd:\backup_%U'
4> keep forever
5> restore point y2007May;


Starting backup at 01-JUN-2010 19:57:58
current log archived

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=D:\DATABASE\ORA11G\ORA11G\SYSTEM01.
input datafile file number=00002 name=D:\DATABASE\ORA11G\ORA11G\SYSAUX01.
input datafile file number=00004 name=D:\DATABASE\ORA11G\ORA11G\USERS01.D
input datafile file number=00003 name=D:\DATABASE\ORA11G\ORA11G\UNDOTBS01
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 19:58:04
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:00
piece handle=D:\BACKUP_06LF5PAC_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:56

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 20:01:00
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:03
piece handle=D:\BACKUP_07LF5PFS_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03


current log archived
using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=48 RECID=47 STAMP=720561667
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 20:01:12
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:15
piece handle=D:\BACKUP_08LF5PG7_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 20:01:24
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:31
piece handle=D:\BACKUP_09LF5PGC_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 01-JUN-2010 20:01:31

Note---> This informationmation taken from oracle metalink. all copy rights oracle only.

Comments