標籤:
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 沒啥區別。
==================
觀察如下兩條備份語句
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
舉一列子,如周1、2、4使用語句2,進行差異備份。 周3使用語句1進行累積備份。則這樣周1、2隻會備份當天產生的歸檔日誌,周3同樣只會備份當天產生的歸檔日誌,而周4會備份周3、4兩天產生的歸檔日誌。
究其原因是,本身對歸檔日誌實現了多工,即不知在FRA中產生歸檔日誌,在其他路徑中同樣產生歸檔日誌。而delete input 只會刪除預設路徑即FRA中的歸檔日誌,其他路徑中的歸檔日誌會保留。所以當周4再備份歸檔日誌時,會將在其他路徑中保留的昨日的歸檔日誌與今日產生的歸檔日誌同時備份。此種情況會導致歸檔日誌被重複備份,浪費儲存資源。
所以當針對歸檔日誌實現了多工時,應使用delete all input 進行歸檔日誌的清理
Oracle delete input與delete all input