Re: RMAN level 0 hot backup and archive logs

  • From: Stefan Koehler <contact@xxxxxxxx>
  • To: Oracle-L@xxxxxxxxxxxxx, kenneth.r.fowler@xxxxxxxxx
  • Date: Tue, 5 Jan 2016 17:18:58 +0100 (CET)

Hi Ken,

The reason being is that sometimes we might need to take a copy of a recent 
level 0 backup and archive it and we will want to be able to restore and
recover at some future time when the archive logs are no longer on disk.
 
This kind of RMAN backup is called "archival backup" and can be created with 
the KEEP option
(http://docs.oracle.com/database/121/RCMRF/rcmsubcl013.htm#BABGDGCC). Just 
quoting from the documentation: "An archival backup is self-contained
because is contains all files necessary to restore the backup and recover it to 
a consistent state. If the database is open during the backup, then
RMAN automatically generates and backs up the archived redo log files needed to 
make the database backup consistent"

However be aware that you should have a RMAN catalog for this procedure, 
otherwise you might lose the RMAN meta-information in control file. You can
also re-register the backup set, but this is not the way how it is supposed to 
be.

P.S.: Any reason why you are not using "AUTOBACKUP ON"? This control file 
backup stuff looks really old-school ;-)

Best Regards
Stefan Koehler

Freelance Oracle performance consultant and researcher
Homepage: http://www.soocs.de
Twitter: @OracleSK
 
Kenneth Fowler <kenneth.r.fowler@xxxxxxxxx> hat am 5. Januar 2016 um 16:33 
geschrieben:

 Hi All,

 We currently have a backup script that executes RMAN level 0 backups once 
per week and level 1 backups every other day.  The code is generated
dynamically via a shell script and is then executed.  Here is a recent 
example of a level 0 backup that was executed...

     sql 'alter system checkpoint';
     backup as compressed backupset incremental level 0
     format 
'/opt/oracle/backup/bioocld1/sets/2016-01-02_211929_lev0/2016-01-02_211929_lev0_%s_%p'
     database;
     alter system switch logfile;
     alter database backup controlfile to 
'/opt/oracle/backup/bioocld1/sets/2016-01-02_211929_lev0/2016-01-02_211929_ctl_bk';

 Archive log backups are not currently included and are backed up via a 
separate process however I want to change this slightly.  I would like the
level 0 backup sets to also include the minimal set of archive logs needed to 
recover the backup.  The reason being is that sometimes we might need
to take a copy of a recent level 0 backup and archive it and we will want to 
be able to restore and recover at some future time when the archive
logs are no longer on disk.

 I guess I can query v$log to get the current archive log sequence before the 
backup starts and use "backup archivelog from sequence nnn" after the
database backup but wondering if there is already some RMAN 
functionality/syntax that I can use to achieve the same?

 Thanks,
 Ken.
 
--
//www.freelists.org/webpage/oracle-l


Other related posts: