rman開啟備份優化對備份歸檔的影響

賀子_DBA時代發表於2018-07-07
問題:
今天遇到了一個奇怪的問題,crontab做的定時任務,每天進行0級增量備份,先備份資料庫庫,然後單獨備份歸檔,並且開啟了備份優化,按道理講每天的備份檔案都差不多或者稍微大點才對,但是現在的情況是,5號產生了22g檔案,6號卻有111g,然後看了下備份日誌,發現是由於6號備份了很多歸檔日誌,為什麼呢?
現象原因分析:
首先介紹下rman備份歸檔日誌的兩種方式:
1.單獨備份歸檔日誌:backup archivelog all
2.在執行備庫時一起備份歸檔日誌:backup database plus archivelog;
這兩種方式有什麼區別呢?後面有相關的測試結果記錄!
1.執行backup archivelog all 命令時執行的步驟:
1)alter system archive log current; #歸檔當前日誌
2)backup archivelog all ; #備份所有歸檔日誌,注意如果備份優化被啟用,RMAN只會備份未備份過的日誌
2.執行backup database plus archivelog,的執行步驟是:
1)alter system archive log current; #歸檔當前日誌
2)backup archivelog all; #備份所有歸檔日誌,注意如果備份優化被啟用,RMAN只會備份未備份過的日誌
3)backup database; #備份資料庫
4)alter system archive log current; #歸檔當前日誌
5)Backs up any remaining archived logs generated during the backup; #備份備份過程中生成的任何剩餘的歸檔日誌
剛開始還懷疑是指令碼執行backup archivelog all 導致的!但是經過試驗發現開啟了rman備份優化對backup archivelog all 也有效!
那麼到底是什麼原因導致我們線上0級備份,一次備份全部歸檔,一次跳過已經備份了的歸檔呢?
原來是由於空間不足,我們就手工刪除之前的備份,只保留1 或者2天的備份,同時我們並沒有設定備份完的歸檔進行刪除,而是根據策略刪除了7天之前的歸檔,也就是保留了7天的歸檔;
當我們刪除了之前備份的歸檔之後,又進行了CROSSCHECK BACKUP;這樣就會把刪除了的歸檔備份設定成了expired,當你再次進行0級備份的時候,他會認為這些expired的歸檔沒有被備份過,會從新備份一次!這樣就表現出來一次備份全部歸檔,一次跳過已經備份了的歸檔;
總結:
當你開啟了rman 優化備份的時候(也就是CONFIGURE BACKUP OPTIMIZATION ON)的時候,rman會跳過只讀、offline、或者已經備份了的歸檔等等來提高rman 備份的效率!
但是如果你把之前的備份檔案刪除了,並且如果此時你執行了CROSSCHECK BACKUP來告訴rman,你之前備份已經expired了(也就是不存在了),那麼rman會從新備份之前備份過的歸檔,如果此時你沒有執行CROSSCHECK BACKUP,也就是rman並不知道之前的備份檔案已經刪除了,你繼續備份的話,rman是不會備份已經備份過的歸檔;
相關測試記錄:
檢視rman相關測試:
RMAN> show all;
RMAN configuration parameters for database with db_unique_name HEZI are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_hezi.f'; # default
一:我們首先驗證採用backup database plus archivelog的方式進行備份的時候,開啟rman備份會怎樣?
1.嘗試第一次0級備份,加上plus archivelog;發現確實全備份歸檔,具體如下所示:
RMAN> backup incremental level 0 database tag 'dbfull' format '/u01/backup/dbfull_%u_%s_%p' plus archivelog format '/u01/backup/archivelog_%u_%s_%p';
Starting backup at 07-JUL-18
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=36 RECID=12 STAMP=979460874
input archived log thread=1 sequence=37 RECID=13 STAMP=979509613
input archived log thread=1 sequence=38 RECID=14 STAMP=979547348
input archived log thread=1 sequence=39 RECID=15 STAMP=979581659
input archived log thread=1 sequence=40 RECID=16 STAMP=979632022
input archived log thread=1 sequence=41 RECID=17 STAMP=979639258
input archived log thread=1 sequence=42 RECID=18 STAMP=979707631
input archived log thread=1 sequence=43 RECID=19 STAMP=979732836
input archived log thread=1 sequence=44 RECID=20 STAMP=979779659
input archived log thread=1 sequence=45 RECID=21 STAMP=979804972
input archived log thread=1 sequence=46 RECID=22 STAMP=979855209
input archived log thread=1 sequence=47 RECID=23 STAMP=979891449
input archived log thread=1 sequence=48 RECID=24 STAMP=979941613
input archived log thread=1 sequence=49 RECID=25 STAMP=979977923
input archived log thread=1 sequence=50 RECID=26 STAMP=980028009
input archived log thread=1 sequence=51 RECID=27 STAMP=980064400
input archived log thread=1 sequence=52 RECID=28 STAMP=980114411
input archived log thread=1 sequence=53 RECID=29 STAMP=980150874
input archived log thread=1 sequence=54 RECID=30 STAMP=980186460
input archived log thread=1 sequence=55 RECID=31 STAMP=980323244
input archived log thread=1 sequence=56 RECID=32 STAMP=980330961
input archived log thread=1 sequence=57 RECID=33 STAMP=980388062
input archived log thread=1 sequence=58 RECID=34 STAMP=980460009
input archived log thread=1 sequence=59 RECID=35 STAMP=980460673
input archived log thread=1 sequence=60 RECID=36 STAMP=980546404
input archived log thread=1 sequence=61 RECID=37 STAMP=980547148
input archived log thread=1 sequence=62 RECID=38 STAMP=980632807
input archived log thread=1 sequence=63 RECID=39 STAMP=980640040
input archived log thread=1 sequence=64 RECID=40 STAMP=980719207
input archived log thread=1 sequence=65 RECID=41 STAMP=980724676
input archived log thread=1 sequence=66 RECID=42 STAMP=980724867
input archived log thread=1 sequence=67 RECID=43 STAMP=980724949
input archived log thread=1 sequence=68 RECID=44 STAMP=980726525
input archived log thread=1 sequence=69 RECID=45 STAMP=980726565
input archived log thread=1 sequence=70 RECID=46 STAMP=980805610
input archived log thread=1 sequence=71 RECID=47 STAMP=980807161
input archived log thread=1 sequence=72 RECID=48 STAMP=980849204
input archived log thread=1 sequence=73 RECID=49 STAMP=980851452
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_0nt7d6nt_23_1 tag=TAG20180707T104412 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
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=00002 name=/u01/app/oracle/oradata/hezi/sysaux01.dbf
input datafile file number=00001 name=/u01/app/oracle/oradata/hezi/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/hezi/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/hezi/users01.dbf
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/dbfull_0ot7d6on_24_1 tag=DBFULL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=74 RECID=50 STAMP=980851515
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_0pt7d6pr_25_1 tag=TAG20180707T104515 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting Control File and SPFILE Autobackup at 07-JUL-18
piece handle=/u01/c-2308528329-20180707-00 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-18
2.嘗試第二次0級增量備份:發現已經備份的歸檔沒有再次備份,skipping archived logs of thread 1 from sequence 36 to 74; already backed up,跳過了已經備份的歸檔!
RMAN> backup incremental level 0 database tag 'dbfull' format '/u01/backup/dbfull_%u_%s_%p' plus archivelog format '/u01/backup/archivelog_%u_%s_%p';


Starting backup at 07-JUL-18
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 device type=DISK
skipping archived logs of thread 1 from sequence 36 to 74; already backed up
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=75 RECID=51 STAMP=980851907
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_0rt7d764_27_1 tag=TAG20180707T105148 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
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=00002 name=/u01/app/oracle/oradata/hezi/sysaux01.dbf
input datafile file number=00001 name=/u01/app/oracle/oradata/hezi/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/hezi/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/hezi/users01.dbf
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/dbfull_0st7d765_28_1 tag=DBFULL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=76 RECID=52 STAMP=980851926
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_0tt7d76m_29_1 tag=TAG20180707T105206 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting Control File and SPFILE Autobackup at 07-JUL-18
piece handle=/u01/c-2308528329-20180707-01 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-18
3.前一次0級備份沒有備份全部的歸檔,嘗試再次0級備份,是不是會備份全部的呢?發現依舊沒有全部備份;
RMAN> backup incremental level 0 database tag 'dbfull' format '/u01/backup/dbfull_%u_%s_%p' plus archivelog format '/u01/backup/archivelog_%u_%s_%p';
Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
skipping archived logs of thread 1 from sequence 36 to 82; already backed up
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=83 RECID=59 STAMP=980852691
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_1bt7d7uk_43_1 tag=TAG20180707T110451 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
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=00002 name=/u01/app/oracle/oradata/hezi/sysaux01.dbf
input datafile file number=00001 name=/u01/app/oracle/oradata/hezi/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/hezi/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/hezi/users01.dbf
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/dbfull_1ct7d7ul_44_1 tag=DBFULL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=84 RECID=60 STAMP=980852709
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_1dt7d7v5_45_1 tag=TAG20180707T110509 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting Control File and SPFILE Autobackup at 07-JUL-18
piece handle=/u01/c-2308528329-20180707-05 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-18

4.我們嘗試進行全備份,發現也沒有全部的歸檔!
RMAN> backup database tag 'dbfull' format '/u01/backup/dbfull_%u_%s_%p' plus archivelog format '/u01/backup/archivelog_%u_%s_%p';


Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
skipping archived logs of thread 1 from sequence 36 to 84; already backed up
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=85 RECID=61 STAMP=980853041
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_1ft7d89h_47_1 tag=TAG20180707T111041 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/u01/app/oracle/oradata/hezi/sysaux01.dbf
input datafile file number=00001 name=/u01/app/oracle/oradata/hezi/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/hezi/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/hezi/users01.dbf
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/dbfull_1gt7d89j_48_1 tag=DBFULL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=86 RECID=62 STAMP=980853059
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_1ht7d8a3_49_1 tag=TAG20180707T111059 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting Control File and SPFILE Autobackup at 07-JUL-18
piece handle=/u01/c-2308528329-20180707-06 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-18
5.我們嘗試把rman備份優化關閉!依舊進行0級增量備份,發現又把所有的歸檔備份了一次!
RMAN> CONFIGURE BACKUP OPTIMIZATION off;

old RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION OFF;
new RMAN configuration parameters are successfully stored
RMAN> backup incremental level 0 database tag 'dbfull' format '/u01/backup/dbfull_%u_%s_%p' plus archivelog format '/u01/backup/archivelog_%u_%s_%p';
Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=36 RECID=12 STAMP=979460874
input archived log thread=1 sequence=37 RECID=13 STAMP=979509613
input archived log thread=1 sequence=38 RECID=14 STAMP=979547348
input archived log thread=1 sequence=39 RECID=15 STAMP=979581659
input archived log thread=1 sequence=40 RECID=16 STAMP=979632022
input archived log thread=1 sequence=41 RECID=17 STAMP=979639258
input archived log thread=1 sequence=42 RECID=18 STAMP=979707631
input archived log thread=1 sequence=43 RECID=19 STAMP=979732836
input archived log thread=1 sequence=44 RECID=20 STAMP=979779659
input archived log thread=1 sequence=45 RECID=21 STAMP=979804972
input archived log thread=1 sequence=46 RECID=22 STAMP=979855209
input archived log thread=1 sequence=47 RECID=23 STAMP=979891449
input archived log thread=1 sequence=48 RECID=24 STAMP=979941613
input archived log thread=1 sequence=49 RECID=25 STAMP=979977923
input archived log thread=1 sequence=50 RECID=26 STAMP=980028009
input archived log thread=1 sequence=51 RECID=27 STAMP=980064400
input archived log thread=1 sequence=52 RECID=28 STAMP=980114411
input archived log thread=1 sequence=53 RECID=29 STAMP=980150874
input archived log thread=1 sequence=54 RECID=30 STAMP=980186460
input archived log thread=1 sequence=55 RECID=31 STAMP=980323244
input archived log thread=1 sequence=56 RECID=32 STAMP=980330961
input archived log thread=1 sequence=57 RECID=33 STAMP=980388062
input archived log thread=1 sequence=58 RECID=34 STAMP=980460009
input archived log thread=1 sequence=59 RECID=35 STAMP=980460673
input archived log thread=1 sequence=60 RECID=36 STAMP=980546404
input archived log thread=1 sequence=61 RECID=37 STAMP=980547148
input archived log thread=1 sequence=62 RECID=38 STAMP=980632807
input archived log thread=1 sequence=63 RECID=39 STAMP=980640040
input archived log thread=1 sequence=64 RECID=40 STAMP=980719207
input archived log thread=1 sequence=65 RECID=41 STAMP=980724676
input archived log thread=1 sequence=66 RECID=42 STAMP=980724867
input archived log thread=1 sequence=67 RECID=43 STAMP=980724949
input archived log thread=1 sequence=68 RECID=44 STAMP=980726525
input archived log thread=1 sequence=69 RECID=45 STAMP=980726565
input archived log thread=1 sequence=70 RECID=46 STAMP=980805610
input archived log thread=1 sequence=71 RECID=47 STAMP=980807161
input archived log thread=1 sequence=72 RECID=48 STAMP=980849204
input archived log thread=1 sequence=73 RECID=49 STAMP=980851452
input archived log thread=1 sequence=74 RECID=50 STAMP=980851515
input archived log thread=1 sequence=75 RECID=51 STAMP=980851907
input archived log thread=1 sequence=76 RECID=52 STAMP=980851926
input archived log thread=1 sequence=77 RECID=53 STAMP=980852305
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_0vt7d7ii_31_1 tag=TAG20180707T105825 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
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=00002 name=/u01/app/oracle/oradata/hezi/sysaux01.dbf
input datafile file number=00001 name=/u01/app/oracle/oradata/hezi/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/hezi/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/hezi/users01.dbf
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/dbfull_10t7d7jb_32_1 tag=DBFULL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 07-JUL-18

Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=78 RECID=54 STAMP=980852347
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_11t7d7jr_33_1 tag=TAG20180707T105907 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting Control File and SPFILE Autobackup at 07-JUL-18
piece handle=/u01/c-2308528329-20180707-02 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-18
總結:前面幾個例子說明,如果開啟了rman備份優化,那麼當你使用backup database plus archivelog這種方式來備份歸檔的時候,只會備份沒有備份過的歸檔,不管是你0級備份還是全備份!
二:我們開啟rman備份優化,然後嘗試backup archivelog all進行備份歸檔,來驗證備份優化是否有效!
1.開啟rman 備份優化,採用backup archivelog all 方式備份歸檔,發現依舊是隻會備份沒有備份過的歸檔!
RMAN> backup archivelog all format '/u01/backup/archivelog_%u_%s_%p';

Starting backup at 07-JUL-18
current log archived
using channel ORA_DISK_1
skipping archived logs of thread 1 from sequence 36 to 87; already backed up
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=88 RECID=64 STAMP=980853380
channel ORA_DISK_1: starting piece 1 at 07-JUL-18
channel ORA_DISK_1: finished piece 1 at 07-JUL-18
piece handle=/u01/backup/archivelog_1lt7d8k5_53_1 tag=TAG20180707T111620 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUL-18

Starting Control File and SPFILE Autobackup at 07-JUL-18
piece handle=/u01/c-2308528329-20180707-08 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-18
總結:開啟rman備份優化,對採用backup archivelog all 方式備份歸檔依舊有效,仍然會跳過已經備份了的歸檔!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29654823/viewspace-2157505/,如需轉載,請註明出處,否則將追究法律責任。

相關文章