In Previous articles we have discussed, RMAN Introduction and started with RMAN commands and first backup. Now we will discuss more about incremental backups.
For taking cumulative incremental backup
To make most of incremental backups, you can use different combined approaches
- For large databases taking full backup is not possible every time as it will consume lot of space, time and resources and may cause performance degradation while database is running.
- Incremental backups are designed to for such scenarios and are among best options.
- As we already discussed here incremental backups are backups which includes only modified blocks since last full incremental backup taken.
- There is base backup level designated with level 0 and subsequent backups after it are labeled level 1.
- For level 1 there another two options
- Differential incremental backups
- Cumulative incremental backups
- Theoretically these are already discussed in detail in RMAN introduction
- Now will discuss commands to take these type of backups
Differential backup at LEVEL 0 for the database
RMAN>
backup incremental level 0 database;
Starting
backup at 09-JAN-19
using
target database control file instead of recovery catalog
allocated
channel: ORA_DISK_1
channel
ORA_DISK_1: sid=23 devtype=DISK
channel
ORA_DISK_1: starting incremental level 0 datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
input
datafile fno=00003 name=C:\ORACLE\ORADATA\TECH_DB\SYSAUX.DBF
input
datafile fno=00001 name=C:\ORACLE\ORADATA\TECH_DB\SYSTEM.DBF
input
datafile fno=00004 name=C:\ORACLE\ORADATA\TECH_DB\USERS.DBF
input
datafile fno=00005 name=C:\ORACLE\ORADATA\TECH_DB\TECHON_TBS.DBF
input
datafile fno=00002 name=C:\ORACLE\ORADATA\TECH_DB\UNDO.DBF
channel
ORA_DISK_1: starting piece 1 at 09-JAN-19
channel
ORA_DISK_1: finished piece 1 at 09-JAN-19
piece
handle=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\TECH_DB\BACKUPSET\2019_01_09\O1_MF_NNND0_TAG20190
109T205403_G3D4JQTM_.BKP
tag=TAG20190109T205403 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:01:16
channel
ORA_DISK_1: starting incremental level 0 datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
including
current control file in backupset
including
current SPFILE in backupset
channel
ORA_DISK_1: starting piece 1 at 09-JAN-19
channel
ORA_DISK_1: finished piece 1 at 09-JAN-19
piece
handle=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\TECH_DB\BACKUPSET\2019_01_09\O1_MF_NCSN0_TAG20190
109T205403_G3D4M4X5_.BKP
tag=TAG20190109T205403 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:06
Finished
backup at 09-JAN-19
RMAN>
For LEVEL 1
RMAN>
backup incremental level 1 database;
Starting
backup at 09-JAN-19
using
channel ORA_DISK_1
channel
ORA_DISK_1: starting incremental level 1 datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
input
datafile fno=00003 name=C:\ORACLE\ORADATA\TECH_DB\SYSAUX.DBF
input
datafile fno=00001 name=C:\ORACLE\ORADATA\TECH_DB\SYSTEM.DBF
input
datafile fno=00004 name=C:\ORACLE\ORADATA\TECH_DB\USERS.DBF
input
datafile fno=00005 name=C:\ORACLE\ORADATA\TECH_DB\TECHON_TBS.DBF
input
datafile fno=00002 name=C:\ORACLE\ORADATA\TECH_DB\UNDO.DBF
channel
ORA_DISK_1: starting piece 1 at 09-JAN-19
channel
ORA_DISK_1: finished piece 1 at 09-JAN-19
piece
handle=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\TECH_DB\BACKUPSET\2019_01_09\O1_MF_NNND1_TAG20190
109T205803_G3D4R3OL_.BKP
tag=TAG20190109T205803 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel
ORA_DISK_1: starting incremental level 1 datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
including
current control file in backupset
including
current SPFILE in backupset
channel
ORA_DISK_1: starting piece 1 at 09-JAN-19
channel
ORA_DISK_1: finished piece 1 at 09-JAN-19
piece
handle=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\TECH_DB\BACKUPSET\2019_01_09\O1_MF_NCSN1_TAG20190
109T205803_G3D4S8LC_.BKP
tag=TAG20190109T205803 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished
backup at 09-JAN-19
RMAN>
For taking cumulative incremental backup
RMAN>
backup incremental level 1 cumulative database;
Starting
backup at 09-JAN-19
using
channel ORA_DISK_1
channel
ORA_DISK_1: starting incremental level 1 datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
input
datafile fno=00003 name=C:\ORACLE\ORADATA\TECH_DB\SYSAUX.DBF
input
datafile fno=00001 name=C:\ORACLE\ORADATA\TECH_DB\SYSTEM.DBF
input
datafile fno=00004 name=C:\ORACLE\ORADATA\TECH_DB\USERS.DBF
input
datafile fno=00005 name=C:\ORACLE\ORADATA\TECH_DB\TECHON_TBS.DBF
input
datafile fno=00002 name=C:\ORACLE\ORADATA\TECH_DB\UNDO.DBF
channel
ORA_DISK_1: starting piece 1 at 09-JAN-19
channel
ORA_DISK_1: finished piece 1 at 09-JAN-19
piece
handle=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\TECH_DB\BACKUPSET\2019_01_09\O1_MF_NNND1_TAG20190
109T210011_G3D4W49C_.BKP
tag=TAG20190109T210011 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel
ORA_DISK_1: starting incremental level 1 datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
including
current control file in backupset
including
current SPFILE in backupset
channel
ORA_DISK_1: starting piece 1 at 09-JAN-19
channel
ORA_DISK_1: finished piece 1 at 09-JAN-19
piece
handle=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\TECH_DB\BACKUPSET\2019_01_09\O1_MF_NCSN1_TAG20190
109T210011_G3D4X96M_.BKP
tag=TAG20190109T210011 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished
backup at 09-JAN-19
RMAN>
To make most of incremental backups, you can use different combined approaches
- Taking full level 0 backup on tape drives as it will be once in a week.
- Taking incremental level 1 backup on disk
- Use of compression
Comment below if any additional information is required.