RMAN 增量備份最佳化 for ORACLE 10G
#############################################################################
RMAN 增量備份最佳化 for ORACLE 10G
#############################################################################
1.未開啟塊改變記錄,進行差異增量備份,測試如下:
SQL> select status from v$block_change_tracking;
STATUS
----------
DISABLED
$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Dec 23 14:23:06 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ASRSLC (DBID=422538457)
RMAN> backup incremental level 0 format='/oradata/bak/bk_%s_%p_%t'
2> database;
Starting backup at 23-DEC-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/oradata/ASRS/smperp_mv.dbf
input datafile fno=00004 name=/oradata/ASRS/users01.dbf
input datafile fno=00005 name=/oradata/ASRS/smpasrs.dbf
input datafile fno=00001 name=/oradata/ASRS/system01.dbf
input datafile fno=00003 name=/oradata/ASRS/sysaux01.dbf
input datafile fno=00002 name=/oradata/ASRS/undotbs01.dbf
input datafile fno=00007 name=/oradata/ASRS/smperp_mv_idx.dbf
channel ORA_DISK_1: starting piece 1 at 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_19_1_738512743 tag=TAG20101223T142543 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55
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 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_20_1_738512858 tag=TAG20101223T142543 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 23-DEC-10
RMAN> backup incremental level 1 format='/oradata/bak/bk_%s_%p_%t' database;
[@more@]Starting backup at 23-DEC-10
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=00006 name=/oradata/ASRS/smperp_mv.dbf
input datafile fno=00004 name=/oradata/ASRS/users01.dbf
input datafile fno=00005 name=/oradata/ASRS/smpasrs.dbf
input datafile fno=00001 name=/oradata/ASRS/system01.dbf
input datafile fno=00003 name=/oradata/ASRS/sysaux01.dbf
input datafile fno=00002 name=/oradata/ASRS/undotbs01.dbf
input datafile fno=00007 name=/oradata/ASRS/smperp_mv_idx.dbf
channel ORA_DISK_1: starting piece 1 at 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_21_1_738513017 tag=TAG20101223T143016 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
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 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_22_1_738513024 tag=TAG20101223T143016 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-DEC-10
###########################
刪除備份
##########################
RMAN> delete backupset 11;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
11 11 1 1 AVAILABLE DISK /oradata/bak/bk_19_1_738512743
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/oradata/bak/bk_19_1_738512743 recid=11 stamp=738512744
Deleted 1 objects
RMAN> delete backupset 12;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
12 12 1 1 AVAILABLE DISK /oradata/bak/bk_20_1_738512858
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/oradata/bak/bk_20_1_738512858 recid=12 stamp=738512860
Deleted 1 objects
RMAN> delete backupset 13;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
13 13 1 1 AVAILABLE DISK /oradata/bak/bk_21_1_738513017
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/oradata/bak/bk_21_1_738513017 recid=13 stamp=738513018
Deleted 1 objects
RMAN> delete backupset 14;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
14 14 1 1 AVAILABLE DISK /oradata/bak/bk_22_1_738513024
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/oradata/bak/bk_22_1_738513024 recid=14 stamp=738513024
Deleted 1 objects
RMAN> list backup;
2.開啟塊改變記錄,備份測試如下:
SQL> alter database enable block change tracking using file '/oradata/ASRS/rman_change_track.f' reuse;
Database altered.
SQL> select status from v$block_change_tracking;
STATUS
----------
ENABLED
$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Dec 23 14:44:11 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ASRSLC (DBID=422538457)
RMAN> list backup;
using target database control file instead of recovery catalog
RMAN> backup incremental level 0 format='/oradata/bak/bk_%s_%p_%t' database;
Starting backup at 23-DEC-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=143 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/oradata/ASRS/smperp_mv.dbf
input datafile fno=00004 name=/oradata/ASRS/users01.dbf
input datafile fno=00005 name=/oradata/ASRS/smpasrs.dbf
input datafile fno=00001 name=/oradata/ASRS/system01.dbf
input datafile fno=00003 name=/oradata/ASRS/sysaux01.dbf
input datafile fno=00002 name=/oradata/ASRS/undotbs01.dbf
input datafile fno=00007 name=/oradata/ASRS/smperp_mv_idx.dbf
channel ORA_DISK_1: starting piece 1 at 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_23_1_738513931 tag=TAG20101223T144531 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55
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 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_24_1_738514047 tag=TAG20101223T144531 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 23-DEC-10
RMAN> backup incremental level 1 format='/oradata/bak/bk_%s_%p_%t' database;
Starting backup at 23-DEC-10
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=00006 name=/oradata/ASRS/smperp_mv.dbf
input datafile fno=00004 name=/oradata/ASRS/users01.dbf
input datafile fno=00005 name=/oradata/ASRS/smpasrs.dbf
input datafile fno=00001 name=/oradata/ASRS/system01.dbf
input datafile fno=00003 name=/oradata/ASRS/sysaux01.dbf
input datafile fno=00002 name=/oradata/ASRS/undotbs01.dbf
input datafile fno=00007 name=/oradata/ASRS/smperp_mv_idx.dbf
channel ORA_DISK_1: starting piece 1 at 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_25_1_738514110 tag=TAG20101223T144829 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
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 23-DEC-10
channel ORA_DISK_1: finished piece 1 at 23-DEC-10
piece handle=/oradata/bak/bk_26_1_738514113 tag=TAG20101223T144829 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 23-DEC-10
-------------
SQL> select * from v$block_change_tracking;
STATUS
----------
FILENAME
--------------------------------------------------------------------------------
BYTES
----------
ENABLED
/oradata/ASRS/rman_change_track.f
11599872
$ du -hs *
3.3G bk_23_1_738513931
7.0M bk_24_1_738514047
444K bk_25_1_738514110
7.0M bk_26_1_738514113
$ du -hs *
6.9M control01.ctl
6.8M control01.ctl.bak
6.9M control02.ctl
6.8M control02.ctl.bak
6.9M control03.ctl
6.8M control03.ctl.bak
51M redo01.log
51M redo02.log
51M redo03.log
12M rman_change_track.f
1.1G smpasrs.dbf
2.0G smperp_mv.dbf
101M smperp_mv_idx.dbf
52M standbyrd01.log
52M standbyrd02.log
52M standbyrd03.log
52M standbyrd04.log
301M sysaux01.dbf
301M system01.dbf
118M temp01.dbf
201M undotbs01.dbf
1.1G users01.dbf
以上測試結果,可以得出alter database enable block change tracking之後,增量備份速度有明顯的提高。
參考:
http://hi.baidu.com/hzbxt/blog/item/3fe183cb338fdcf452664ffc.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/789833/viewspace-1043530/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RMAN 增量備份Oracle
- Oracle 11g RMAN備份-增量備份Oracle
- oracle10g RMAN增量備份策略Oracle
- rman備份和增量備份指令碼指令碼
- rman增量備份指令碼指令碼
- oracle聯機熱備份的原理,及rman增量備份原理Oracle
- Oracle聯機熱備份的原理及rman增量備份原理Oracle
- RMAN說,我能備份(9)--RMAN增量備份與備份保留策略
- [Rman]Oracle Rman增量備份Level012指令碼Oracle指令碼
- oracle聯機熱備份的原理及rman增量備份原理(zt)Oracle
- oracle實驗記錄 (恢復-rman增量備份)Oracle
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-累積增量備份GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-差異增量備份GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-多級增量備份GUIIDE
- 怎樣才能提高Oracle 10G增量備份速度Oracle 10g
- oracle 10g RMAN備份及恢復Oracle 10g
- Oracle之差異增量備份與累積增量備份Oracle
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-增量備份演算法GUIIDE演算法
- 【RMAN】使用增量備份更新資料庫備份映象資料庫
- Oracle的差異增量備份和累積增量備份Oracle
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-累積增量備份-練習GUIIDE
- 【RMAN】RMAN備份恢復3 RMAN增量備份指令碼與crontab計劃任務指令碼
- Oracle的差異增量備份和累積增量備份(zt)Oracle
- oracle 10g中使用block change tracking加快增量備份Oracle 10gBloC
- Backup And Recovery User's Guide-RMAN備份概念-增量備份GUIIDE
- Rman增量壓縮備份來解決備份空間不足
- oracle資料庫備份之exp增量備份Oracle資料庫
- Oracle RMAN 增量備份優化方法(啟用 Block Change Tracking特性)Oracle優化BloC
- oracle之rman備份Oracle
- oracle rman備份命令Oracle
- 【轉】Oracle rman備份Oracle
- Nocatalog 下的RMAN 增量備份 shell指令碼指令碼
- 使用RMAN增量備份前滾STANDBY資料庫資料庫
- 使用RMAN增量更新備份實現快速還原
- 一個較完整的RMAN增量備份指令碼指令碼
- RMAN關於物理檔案copy的增量備份
- oracle 增量備份恢復驗證Oracle
- Oracle RMAN備份實戰Oracle