rman 0级1级增量备份

rman 0级增量备份:

参考网址: http://blog.itpub.net/29119536/viewspace-1131999/


[oracle@KMVS-CENTOS init]$ rman target /

RMAN> backup incremental level 0 database;

小结:其实全备和0级增量备份都是全备,但是也是有区别的,0级增量备份可以用于增量备份恢复的基础,而单独的全备不能用于增量备份的恢复基础!0级增量备份的命令如下:RMAN> backup incremental level 0 database;


Starting backup at 12-JUL-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=938 device type=DISK
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=00002 name=/home/oracle/app/oradata/orcl/sysaux01.dbf
input datafile file number=00001 name=/home/oracle/app/oradata/orcl/system01.dbf
input datafile file number=00003 name=/home/oracle/app/oradata/orcl/undotbs01.dbf
input datafile file number=00005 name=/home/oracle/app/oradata/orcl/kmdata01.dbf
input datafile file number=00006 name=/home/oracle/app/oradata/orcl/kmdata02.dbf
input datafile file number=00007 name=/home/oracle/app/oradata/orcl/kmdata03.dbf
input datafile file number=00008 name=/home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
input datafile file number=00009 name=/home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
input datafile file number=00010 name=/home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
input datafile file number=00011 name=/home/oracle/app/oradata/orcl/KMSEARCH01.dbf
input datafile file number=00004 name=/home/oracle/app/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 12-JUL-17
channel ORA_DISK_1: finished piece 1 at 12-JUL-17
piece handle=/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/09s95ekp_1_1 tag=TAG20170712T100201 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 12-JUL-17

Starting Control File and SPFILE Autobackup at 12-JUL-17
piece handle=/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170712-00 comment=NONE
Finished Control File and SPFILE Autobackup at 12-JUL-17



RMAN> list backupset;

List of Backup Sets
===================


BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 1.31G DISK 00:00:11 11-JUL-17
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: DBFULL_ORCL
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/01s93tde_1_1
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 9.36M DISK 00:00:00 11-JUL-17
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20170711T200205
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170711-00
SPFILE Included: Modification time: 11-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3333947 Ckp time: 11-JUL-17

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
3 4.39M DISK 00:00:01 11-JUL-17
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20170711T200206
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/03s93tdu_1_1

List of Archived Logs in backup set 3
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 203 3328795 11-JUL-17 3333958 11-JUL-17
1 204 3333958 11-JUL-17 3333966 11-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 9.36M DISK 00:00:00 11-JUL-17
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20170711T200208
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170711-01
SPFILE Included: Modification time: 11-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3333977 Ckp time: 11-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 1.32G DISK 00:00:09 11-JUL-17
BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20170711T202127
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/05s93ui7_1_1
List of Datafiles in backup set 5
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 9.36M DISK 00:00:00 11-JUL-17
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20170711T210243
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170711-03
SPFILE Included: Modification time: 11-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3335326 Ckp time: 11-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Incr 0 1.32G DISK 00:00:08 12-JUL-17
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20170712T100201
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/09s95ekp_1_1
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Full 9.36M DISK 00:00:00 12-JUL-17
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20170712T100216
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170712-00
SPFILE Included: Modification time: 12-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3388253 Ckp time: 12-JUL-17


小结:list backupset结果可以看出,全备和0级增量备份在type上的区别!同理,可以对数据库做1级增量备份,命令如下:
RMAN> backup incremental level 1 database;
此时rman需要对比0级增量备份后到执行1级增量备份时候的数据变化情况,备份出来的备份大小由数据更改的多少而定!

rman 1级增量备份:

RMAN> backup incremental level 1 database;


Starting backup at 12-JUL-17
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=00002 name=/home/oracle/app/oradata/orcl/sysaux01.dbf
input datafile file number=00001 name=/home/oracle/app/oradata/orcl/system01.dbf
input datafile file number=00003 name=/home/oracle/app/oradata/orcl/undotbs01.dbf
input datafile file number=00005 name=/home/oracle/app/oradata/orcl/kmdata01.dbf
input datafile file number=00006 name=/home/oracle/app/oradata/orcl/kmdata02.dbf
input datafile file number=00007 name=/home/oracle/app/oradata/orcl/kmdata03.dbf
input datafile file number=00008 name=/home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
input datafile file number=00009 name=/home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
input datafile file number=00010 name=/home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
input datafile file number=00011 name=/home/oracle/app/oradata/orcl/KMSEARCH01.dbf
input datafile file number=00004 name=/home/oracle/app/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 12-JUL-17
channel ORA_DISK_1: finished piece 1 at 12-JUL-17
piece handle=/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/0bs95gli_1_1 tag=TAG20170712T103634 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 12-JUL-17

Starting Control File and SPFILE Autobackup at 12-JUL-17
piece handle=/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170712-01 comment=NONE
Finished Control File and SPFILE Autobackup at 12-JUL-17



RMAN> list backupset;


List of Backup Sets
===================


BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 1.31G DISK 00:00:11 11-JUL-17
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: DBFULL_ORCL
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/01s93tde_1_1
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 Full 3333936 11-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 9.36M DISK 00:00:00 11-JUL-17
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20170711T200205
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170711-00
SPFILE Included: Modification time: 11-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3333947 Ckp time: 11-JUL-17

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
3 4.39M DISK 00:00:01 11-JUL-17
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20170711T200206
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/03s93tdu_1_1

List of Archived Logs in backup set 3
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 203 3328795 11-JUL-17 3333958 11-JUL-17
1 204 3333958 11-JUL-17 3333966 11-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 9.36M DISK 00:00:00 11-JUL-17
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20170711T200208
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170711-01
SPFILE Included: Modification time: 11-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3333977 Ckp time: 11-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 1.32G DISK 00:00:09 11-JUL-17
BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20170711T202127
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/05s93ui7_1_1
List of Datafiles in backup set 5
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 Full 3335227 11-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 9.36M DISK 00:00:00 11-JUL-17
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20170711T210243
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170711-03
SPFILE Included: Modification time: 11-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3335326 Ckp time: 11-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Incr 0 1.32G DISK 00:00:08 12-JUL-17
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20170712T100201
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/09s95ekp_1_1
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 0 Incr 3388242 12-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Full 9.36M DISK 00:00:00 12-JUL-17
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20170712T100216
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170712-00
SPFILE Included: Modification time: 12-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3388253 Ckp time: 12-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9 Incr 1 728.00K DISK 00:00:23 12-JUL-17
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20170712T103634
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/0bs95gli_1_1
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/system01.dbf
2 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/sysaux01.dbf
3 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/undotbs01.dbf
4 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/users01.dbf
5 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata01.dbf
6 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata02.dbf
7 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/kmdata03.dbf
8 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/KMPRODUCT_INDEX01.dbf
9 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/KMUSER_INDEX01.dbf
10 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/KMORDER_INDEX01.dbf
11 1 Incr 3389404 12-JUL-17 /home/oracle/app/oradata/orcl/KMSEARCH01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10 Full 9.36M DISK 00:00:00 12-JUL-17
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20170712T103659
Piece Name: /home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/c-1472885914-20170712-01
SPFILE Included: Modification time: 12-JUL-17
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 3389420 Ckp time: 12-JUL-17




















































































































你可能感兴趣的:(rman,0级1级增量备份)