Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌

lusklusklusk發表於2020-08-16

Delete input:只刪除已經備份的本地歸檔日誌,有多個本地歸檔路徑的話則只刪除已經備份的那個本地歸檔路徑下的歸檔日誌,其他未備份的本地歸檔路徑下的歸檔日誌不刪除


Delete all input:刪除所有本地歸檔日誌,有多個本地歸檔路徑的話,刪除所有本地歸檔路徑下的歸檔日誌,但是DATAGUARD伺服器路徑下的歸檔日誌不刪除



如下案例,歸檔路徑為 /home/oracle/1、 /home/oracle/2,每次生成歸檔日誌時都會生成兩份,一份放 /home/oracle/1,一份放 /home/oracle/2,執行rman備份歸檔日誌時使用了delete input,發現只備份了 /home/oracle/1目錄裡面seq為8和12的這兩個日誌日誌和 /home/oracle/2目錄裡面seq為9、10、11的這三個日誌檔案,總計備份了5個日誌檔案,沒有把 /home/oracle/1和 /home/oracle/2下都存在的8、9、10、11、12總計10個檔案都備份起來,delete input後,發現 /home/oracle/1還剩seq為9、10、11的三個檔案, /home/oracle/2還剩seq為8、12的兩個檔案



log_archive_dest_1='location=/home/oracle/1'

log_archive_dest_2='location=/home/oracle/2'


RMAN> backup archivelog all format '/home/oracle/bak/arch%U' delete input;

Starting backup at 19-AUG-18

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=43 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=8 RECID=3 STAMP=984577837

input archived log thread=1 sequence=9 RECID=6 STAMP=984577838

input archived log thread=1 sequence=10 RECID=8 STAMP=984577841

input archived log thread=1 sequence=11 RECID=10 STAMP=984577841

input archived log thread=1 sequence=12 RECID=11 STAMP=984577887

channel ORA_DISK_1: starting piece 1 at 19-AUG-18

channel ORA_DISK_1: finished piece 1 at 19-AUG-18

piece handle=/home/oracle/bak/arch05tautr0_1_1 tag=TAG20180819T135128 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07

channel ORA_DISK_1: deleting archived log(s)

archived log file name=/home/oracle/1/1_8_980637067.dbf RECID=3 STAMP=984577837

archived log file name=/home/oracle/2/1_9_980637067.dbf RECID=6 STAMP=984577838

archived log file name=/home/oracle/2/1_10_980637067.dbf RECID=8 STAMP=984577841

archived log file name=/home/oracle/2/1_11_980637067.dbf RECID=10 STAMP=984577841

archived log file name=/home/oracle/1/1_12_980637067.dbf RECID=11 STAMP=984577887

Finished backup at 19-AUG-18



[oracle@ocp ~]$ ll /home/oracle/1

total 12

-rw-r----- 1 oracle oinstall 1536 Aug 19 13:50 1_10_980637067.dbf

-rw-r----- 1 oracle oinstall 1024 Aug 19 13:50 1_11_980637067.dbf

-rw-r----- 1 oracle oinstall 1024 Aug 19 13:50 1_9_980637067.dbf

[oracle@ocp ~]$ ll /home/oracle/2

total 2436

-rw-r----- 1 oracle oinstall    5632 Aug 19 13:51 1_12_980637067.dbf

-rw-r----- 1 oracle oinstall 2481152 Aug 19 13:50 1_8_980637067.dbf

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

相關文章