增量备份分为差异备份(differential incremental backup)和累积备份(cumulative incremental backup),这是两种执行增量备份操作的不同方法。
80. You perform differential incremental level 1 backups of your database on each working day and level 0
backup on Sundays, to tape.
Which two statements are true about differential incremental backups? (Choose two.)
A.The backup performed on Sundays contains all the blocks that have ever been used in the database.
B.The backup performed on Sundays contains all the blocks that have changed since the last level 1
backup.
C.The backup performed on each working day contains all the blocks that have changed since the last
level 0 backup.
D.The backup performed on Monday contains all the blocks that have changed since the level 0 backup,
and every other working day contains all the blocks that have changed since the level 1 backup.
Answer: AD
题目备份策略如下:
执行增量备份操作时,首先需要的是增量基本备份(incremental base backup),即level 0,今后所有的增量备份都是基于这个基本备份的。
每次执行数据库的备份操作时,都可以通过backup命令incremental参数来为备份派一个增量级别标识符。
基本备份的增量级别为0,并且必须有基本备份才能够执行其它类型的增量备份操作。
如果没有生成基本备份就尝试执行增量备份操作(这个增量备份操作使用0以外的备份级别),RMAN就自动执行基本备份操作。
下面是一个执行基本增量备份操作的命令:
1、首先使用rman连接目标库。 rman target /
[oracle@rtest ~]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Sep 17 10:12:39 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: TEST0910 (DBID=1912424611)
2、执行0级增量备份。 backup incremental level 0 database
RMAN> backup incremental level 0 database;
Starting backup at 17-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/test0910/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/test0910/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/test0910/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/test0910/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/test0910/testtb.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd0_TAG20130917T101737_93js455s_.bkp tag=TAG20130917T101737 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:17:20
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn0_TAG20130917T101737_93jt4oct_.bkp tag=TAG20130917T101737 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 17-SEP-13
3、执行1级增量备份。 backup incremental level 1 database;
RMAN> backup incremental level 1 database;
Starting backup at 17-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/test0910/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/test0910/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/test0910/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/test0910/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/test0910/testtb.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd1_TAG20130917T103557_93jt6hjt_.bkp tag=TAG20130917T103557 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn1_TAG20130917T103557_93jtb225_.bkp tag=TAG20130917T103557 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 17-SEP-13
查看备份集:
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Incr 0 1.16G DISK 00:17:14 17-SEP-13
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20130917T101737
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd0_TAG20130917T101737_93js455s_.bkp
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/system01.dbf
2 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/sysaux01.dbf
3 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/undotbs01.dbf
4 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/users01.dbf
5 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/example01.dbf
6 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/testtb.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Incr 0 9.36M DISK 00:00:08 17-SEP-13
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20130917T101737
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn0_TAG20130917T101737_93jt4oct_.bkp
SPFILE Included: Modification time: 16-SEP-13
SPFILE db_unique_name: TEST0910
Control File Included: Ckp SCN: 1507287 Ckp time: 17-SEP-13
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Incr 1 392.00K DISK 00:01:55 17-SEP-13
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20130917T103557
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd1_TAG20130917T103557_93jt6hjt_.bkp
List of Datafiles in backup set 8
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/system01.dbf
2 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/sysaux01.dbf
3 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/undotbs01.dbf
4 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/users01.dbf
5 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/example01.dbf
6 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/testtb.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9 Incr 1 9.36M DISK 00:00:04 17-SEP-13
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20130917T103557
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn1_TAG20130917T103557_93jtb225_.bkp
SPFILE Included: Modification time: 16-SEP-13
SPFILE db_unique_name: TEST0910
Control File Included: Ckp SCN: 1507384 Ckp time: 17-SEP-13
其实增量备份分为差异备份和累积备份,这是两种执行增量备份操作的不同方法。
这道题目是讲差异增量备份。
差异备份是RMAN生成的增量备份的默认类型。对于差异备份来说,RMAN会备份自上一次同级或低级差异增量备份以来所有发生变化的数据块。
如图:本题是说星期天进行级别为0的差异增量备份操作,这个备份会操作备份整个数据库。
根据这个级别为0的备份,我们在星期一到星期六进行级别为1的差异增量备份操作。
使用差异备份,每天的备份将包含自一次差异备份以来发生的所有更改。
最后,在下一个星期天,进行别一次基本备份(即级别为0的增量备份)。
Sunday
An incremental level 0 backup backs up all blocks that have ever been in use in this database.
0级增量备份会备份所有曾经在此数据库中使用的块。
Monday through Saturday
On each day from Monday through Saturday, a differential incremental level 1 backup backs up all blocks that have changed since the most recent incremental backup at level 1 or 0. The Monday backup copies blocks changed since Sunday level 0 backup, the Tuesday backup copies blocks changed since the Monday level 1 backup, and so forth.
从星期一到星期六的每一天,1级增量备份备份最近1或0级增量备份以来所有更改过的块。周一备份周日0级备份以来变化的块,周二备份周一1级备份改变的块,等等。
官网参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#sthref707
82、You are managing an Oracle Database 11g database with the following backup strategy:
1) On Sunday, an incremental level 0 tape backup is performed.
2) Monday through Saturday, a cumulative incremental level 1 tape backup is performed.
Which two statements are true regarding the backups performed? (Choose two.)
A.The backup performed in step 1 backs up all blocks that have ever been in use in the database.
B.The backup performed in step 2 copies all the blocks changed since the most recent level 0 backup.
C.The backup performed in step 1 backs up all the blocks changed since the most recent level 1 backup.
D.The backup performed in step 2 backs up all blocks that have changed since the most recent
incremental backup at level 1.
Answer: AB
备份策略如下:
此题考的是增量累积备份
Cumulative Incremental Backups增量累积备份
In a cumulative level 1 backup, RMAN backs up all blocks used since the most recent level 0 incremental backup in either the current or parent incarnation.
Cumulative incremental backups reduce the work needed for a restore operation by ensuring that you only need one incremental backup from any particular level.
Cumulative backups require more space and time than differential backups because they duplicate the work done by previous backups at the same level.
Sunday
An incremental level 0 backup backs up all blocks that have ever been in use in this database.
0级增量备份会备份所有曾经在此数据库中使用的块。
Monday - Saturday
A cumulative incremental level 1 backup copies all blocks changed since the most recent level 0 backup.
Because the most recent level 0 backup was created on Sunday,
the level 1 backup on each day Monday through Saturday backs up all blocks changed since the Sunday backup(level 0 backup).
增量累积1级备份,备份自最近0级备份所有变化的块。
因为最近0级备份在周日,
从星期一到星期六的1级备份,是备份自周日即0级备份所有变化的块。
下面是一个执行基本增量备份操作的命令:
1、首先使用rman连接目标库。 rman target /
[oracle@rtest ~]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Sep 17 10:12:39 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: TEST0910 (DBID=1912424611)
2、执行0级增量备份。 backup incremental level 0 database
RMAN> backup incremental level 0 database;
Starting backup at 17-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/test0910/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/test0910/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/test0910/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/test0910/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/test0910/testtb.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd0_TAG20130917T101737_93js455s_.bkp tag=TAG20130917T101737 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:17:20
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn0_TAG20130917T101737_93jt4oct_.bkp tag=TAG20130917T101737 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 17-SEP-13
3、执行1级增量累积备份。 backup incremental level 1 cumulative database; 星期一是与0级备份之间的差异备份,星期二是与0级备份之间的差异累积备份,等等。
RMAN> backup incremental level 1 cumulative database;
Starting backup at 17-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/test0910/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/test0910/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/test0910/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/test0910/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/test0910/testtb.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd1_TAG20130917T104324_93jtndyx_.bkp tag=TAG20130917T104324 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 17-SEP-13
channel ORA_DISK_1: finished piece 1 at 17-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn1_TAG20130917T104324_93jtnjq4_.bkp tag=TAG20130917T104324 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 17-SEP-13
查看备份集:
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Incr 0 1.16G DISK 00:17:14 17-SEP-13
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20130917T101737
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd0_TAG20130917T101737_93js455s_.bkp
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/system01.dbf
2 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/sysaux01.dbf
3 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/undotbs01.dbf
4 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/users01.dbf
5 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/example01.dbf
6 0 Incr 1506893 17-SEP-13 /u01/app/oracle/oradata/test0910/testtb.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Incr 0 9.36M DISK 00:00:08 17-SEP-13
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20130917T101737
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn0_TAG20130917T101737_93jt4oct_.bkp
SPFILE Included: Modification time: 16-SEP-13
SPFILE db_unique_name: TEST0910
Control File Included: Ckp SCN: 1507287 Ckp time: 17-SEP-13
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Incr 1 392.00K DISK 00:01:55 17-SEP-13
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20130917T103557
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd1_TAG20130917T103557_93jt6hjt_.bkp
List of Datafiles in backup set 8
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/system01.dbf
2 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/sysaux01.dbf
3 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/undotbs01.dbf
4 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/users01.dbf
5 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/example01.dbf
6 1 Incr 1507334 17-SEP-13 /u01/app/oracle/oradata/test0910/testtb.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9 Incr 1 9.36M DISK 00:00:04 17-SEP-13
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20130917T103557
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn1_TAG20130917T103557_93jtb225_.bkp
SPFILE Included: Modification time: 16-SEP-13
SPFILE db_unique_name: TEST0910
Control File Included: Ckp SCN: 1507384 Ckp time: 17-SEP-13
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10 Incr 1 472.00K DISK 00:00:02 17-SEP-13
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20130917T104324
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_nnnd1_TAG20130917T104324_93jtndyx_.bkp
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 1 Incr 1507539 17-SEP-13 /u01/app/oracle/oradata/test0910/system01.dbf
2 1 Incr 1507539 17-SEP-13 /u01/app/oracle/oradata/test0910/sysaux01.dbf
3 1 Incr 1507539 17-SEP-13 /u01/app/oracle/oradata/test0910/undotbs01.dbf
4 1 Incr 1507539 17-SEP-13 /u01/app/oracle/oradata/test0910/users01.dbf
5 1 Incr 1507539 17-SEP-13 /u01/app/oracle/oradata/test0910/example01.dbf
6 1 Incr 1507539 17-SEP-13 /u01/app/oracle/oradata/test0910/testtb.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11 Incr 1 9.36M DISK 00:00:04 17-SEP-13
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20130917T104324
Piece Name: /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_17/o1_mf_ncsn1_TAG20130917T104324_93jtnjq4_.bkp
SPFILE Included: Modification time: 16-SEP-13
SPFILE db_unique_name: TEST0910
Control File Included: Ckp SCN: 1507540 Ckp time: 17-SEP-13
官网参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#sthref707