[20180228]archivelog backup?log switch?

lfree發表於2018-02-28

[20180228]How to prevent RMAN archivelog backup from log switch.txt

--//備份歸檔時有時候避免log switch.可以加入until time 'sysdate'限制條件,測試如下:
--//https://blog.dbi-services.com/prevent-rman-archivelog-backup-log-switch/
--//我感覺加入not backed up 1 times ;更佳,避免備份多次.測試如下:

SCOTT@book> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

SYS@book> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/archivelog/book/
Oldest online log sequence     703
Next log sequence to archive   705
Current log sequence           705


RMAN> backup archivelog  until time 'sysdate' not backed up 1 times ;
Starting backup at 2018-02-28 10:58:29
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=28 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=54 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=695 RECID=1235 STAMP=969271723
input archived log thread=1 sequence=696 RECID=1236 STAMP=969271739
input archived log thread=1 sequence=697 RECID=1239 STAMP=969272321
input archived log thread=1 sequence=698 RECID=1241 STAMP=969272449
channel ORA_DISK_1: starting piece 1 at 2018-02-28 10:58:31
channel ORA_DISK_2: starting archived log backup set
channel ORA_DISK_2: specifying archived log(s) in backup set
input archived log thread=1 sequence=699 RECID=1243 STAMP=969272579
input archived log thread=1 sequence=700 RECID=1245 STAMP=969273334
input archived log thread=1 sequence=701 RECID=1248 STAMP=969273514
input archived log thread=1 sequence=702 RECID=1250 STAMP=969273523
channel ORA_DISK_2: starting piece 1 at 2018-02-28 10:58:31
channel ORA_DISK_3: starting archived log backup set
channel ORA_DISK_3: specifying archived log(s) in backup set
input archived log thread=1 sequence=703 RECID=1252 STAMP=969273525
input archived log thread=1 sequence=704 RECID=1254 STAMP=969273527
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
channel ORA_DISK_3: starting piece 1 at 2018-02-28 10:58:31
channel ORA_DISK_1: finished piece 1 at 2018-02-28 10:58:32
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_02_28/o1_mf_annnn_TAG20180228T105830_f9d6pq0x_.bkp tag=TAG20180228T105830 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_2: finished piece 1 at 2018-02-28 10:58:32
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_02_28/o1_mf_annnn_TAG20180228T105830_f9d6pq18_.bkp tag=TAG20180228T105830 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: finished piece 1 at 2018-02-28 10:58:32
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_02_28/o1_mf_annnn_TAG20180228T105830_f9d6pq1h_.bkp tag=TAG20180228T105830 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
Finished backup at 2018-02-28 10:58:32

Starting Control File and SPFILE Autobackup at 2018-02-28 10:58:32
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2018_02_28/o1_mf_s_969274712_f9d6pr5l_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2018-02-28 10:58:33

RMAN> backup archivelog  until time 'sysdate' not backed up 1 times ;
Starting backup at 2018-02-28 10:58:53
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
skipping archived logs of thread 1 from sequence 695 to 704; already backed up
Finished backup at 2018-02-28 10:58:53

--//第2次就沒有備份.

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

相關文章