10g optimized incremental backups to disk
Posted by Gavin Soorma on June 24, 2009
By using a combination of Oracle 10g Block Change Tracking and RMAN Optimised Incremental Backups we can significantly reduce backup durations and more importantly restore and recover time.
The optimised incremental backup will ensure that subsequent incremental backups after a full backup only contain blocks changed since the last backup and will also apply archive logs to the backup on disk so that the backupset on disk can be used to recover the database without applying any archivelog files.
Also, since the backup on disk is actually the image of the database with all recent changes applied to it, we can issue a SWITCH DATABASE TO COPY command in the event of a database crash and bring up the database directly from the backup on disk in a few minutes without having to restore any file from tape.
Note the first run of the RMAN backup command and compare the same with the second run …….. the backup of the database includes an internal recovery operation as well.
allocate channel c1 device type disk format ‘/u02/oradata/backup/bkp.%u’;
recover copy of database with tag ‘LEVEL0_BKP’;
backup incremental level 1 for recover of copy with tag ‘LEVEL0_BKP’ database;
}
channel c1: sid=147 devtype=DISK
Starting recover at 11-MAR-09
no copy of datafile 1 found to recover
no copy of datafile 2 found to recover
no copy of datafile 3 found to recover
no copy of datafile 4 found to recover
no copy of datafile 5 found to recover
no copy of datafile 6 found to recover
no copy of datafile 8 found to recover
Finished recover at 11-MAR-09
Starting backup at 11-MAR-09
channel c1: starting incremental level 1 datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u02/oradata/rcatd/system01.dbf
input datafile fno=00003 name=/u02/oradata/rcatd/sysaux01.dbf
input datafile fno=00006 name=/u02/oradata/rcatd/rman10d01.dbf
input datafile fno=00002 name=/u02/oradata/rcatd/undotbs01.dbf
input datafile fno=00004 name=/u02/oradata/rcatd/users01.dbf
input datafile fno=00005 name=/u02/oradata/rcatd/rman9d01.dbf
input datafile fno=00008 name=/u02/oradata/rcatd/patrol01.dbf
channel c1: starting piece 1 at 11-MAR-09
channel c1: finished piece 1 at 11-MAR-09
piece handle=/u02/oradata/backup/bkp.09k9l940 tag=TAG20090311T124136 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: starting incremental level 1 datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel c1: starting piece 1 at 11-MAR-09
channel c1: finished piece 1 at 11-MAR-09
piece handle=/u02/oradata/backup/bkp.0ak9l941 tag=TAG20090311T124136 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
Finished backup at 11-MAR-09
released channel: c1
RMAN> run {
allocate channel c1 device type disk format ‘/u02/oradata/backup/bkp.%u’;
recover copy of database with tag ‘LEVEL0_BKP’;
backup incremental level 1 for recover of copy with tag ‘LEVEL0_BKP’ database;
}
Starting recover at 11-MAR-09
channel c1: starting incremental datafile backupset restore
channel c1: specifying datafile copies to recover
recovering datafile copy fno=00001 name=/u02/oradata/backup/bkp.01k9l8o8
recovering datafile copy fno=00002 name=/u02/oradata/backup/bkp.04k9l8s7
recovering datafile copy fno=00003 name=/u02/oradata/backup/bkp.02k9l8q0
recovering datafile copy fno=00004 name=/u02/oradata/backup/bkp.05k9l8sm
recovering datafile copy fno=00005 name=/u02/oradata/backup/bkp.06k9l8st
recovering datafile copy fno=00006 name=/u02/oradata/backup/bkp.03k9l8re
recovering datafile copy fno=00008 name=/u02/oradata/backup/bkp.07k9l8t1
channel c1: reading from backup piece /u02/oradata/backup/bkp.09k9l940
channel c1: restored backup piece 1
piece handle=/u02/oradata/backup/bkp.09k9l940 tag=TAG20090311T124136
channel c1: restore complete, elapsed time: 00:00:02
Finished recover at 11-MAR-09
Starting backup at 11-MAR-09
channel c1: starting incremental level 1 datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u02/oradata/rcatd/system01.dbf
input datafile fno=00003 name=/u02/oradata/rcatd/sysaux01.dbf
input datafile fno=00006 name=/u02/oradata/rcatd/rman10d01.dbf
input datafile fno=00002 name=/u02/oradata/rcatd/undotbs01.dbf
input datafile fno=00004 name=/u02/oradata/rcatd/users01.dbf
input datafile fno=00005 name=/u02/oradata/rcatd/rman9d01.dbf
input datafile fno=00008 name=/u02/oradata/rcatd/patrol01.dbf
channel c1: starting piece 1 at 11-MAR-09
channel c1: finished piece 1 at 11-MAR-09
piece handle=/u02/oradata/backup/bkp.0bk9lak7 tag=TAG20090311T130719 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
channel c1: starting incremental level 1 datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel c1: starting piece 1 at 11-MAR-09
channel c1: finished piece 1 at 11-MAR-09
piece handle=/u02/oradata/backup/bkp.0ck9lake tag=TAG20090311T130719 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-MAR-09
released channel: c1

ictbus said
We also make use of this technology to improve throughput. It’s a good combination together with Tivoli Storage Manager for Databases, the product we use for online backup. Because network bandwidth can be a problem it’s very useful.For people who want to know a little bid more about this (and read Dutch
) see here: http://ictbus.nl/index.php?id=11
or mailto info@ictbus.nl