下面是一个执行基本增量备份操作的命令:
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