Oracle delete input與delete all input

oracle官方文檔提示:
If you had specified DELETE INPUT rather than DELETE ALL INPUT, then RMAN would have only deleted the specific archived redo log files that it backed up. For example, RMAN would delete the logs in /arc_dest1 if these files were used as the source of the backup, but leave the contents of the /arc_dest2 intact
若是指定delete input ,則rman將僅刪除已備份的歸檔日誌,例如對於有兩個歸檔目錄 /arc_dest1 和 /arc_dest2 若是把/arc_dest1作爲backup的源,delete input將刪除 /arc_dest1 中的內容,保留dest2中的歸檔日誌,經過實驗能夠看出,就算有兩個歸檔位置,rman備份的時候貌似是以日誌文件爲源,備份過的日誌刪除。
------------------------------------------------------------
If you had specified DELETE ALL INPUT RMAN backs up only one copy of each log sequence number in these archiving locations.it deletes all copies of any log that it backed up from the other archiving destinations
若是指定delete all input RMAN對於全部歸檔目錄中的日誌序列號只備份一次,同時rman會刪除dest1 和dest2 中全部歸檔日誌。
結論:對於僅有一個歸檔目錄 delete input 和delet all input 沒啥區別。oracle

==================
觀察以下兩條備份語句
1)backup as compressed backupset filesperset 4 incremental level=1 cumulative database plus archivelog delete input;
2)backup as compressed backupset filesperset 4 incremental level 1 database;
backup as compressed backupset archivelog all delete all input;
語句1是一個累積備份,語句2是一個差別1備份。備份結束後都但願備份歸檔日誌同時在刪除已備份的歸檔日誌。區別在於語句1使用delete input,語句2使用delete all input
舉一列子,如週一、二、4使用語句2,進行差別備份。 周3使用語句1進行累積備份。則這樣週一、2只會備份當天生成的歸檔日誌,周3一樣只會備份當天生成的歸檔日誌,而周4會備份週三、4兩天生成的歸檔日誌。
究其緣由是,自己對歸檔日誌實現了多路複用,即不知在FRA中生成歸檔日誌,在其餘路徑中一樣生成歸檔日誌。而delete input 只會刪除默認路徑即FRA中的歸檔日誌,其餘路徑中的歸檔日誌會保留。因此當週4再備份歸檔日誌時,會將在其餘路徑中保留的昨日的歸檔日誌與今日生成的歸檔日誌同時備份。此種狀況會致使歸檔日誌被重複備份,浪費存儲資源。
因此當針對歸檔日誌實現了多路複用時,應使用delete all input 進行歸檔日誌的清理spa

相關文章
相關標籤/搜索