|
关于exclude:
关于通道里的Multiplexing:
- RMAN> backup tag 'T9' database;
- Starting backup at 2018-07-02:00:29:33
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=15 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=49 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.268.979853699
- input datafile file number=00005 name=+DATA/orcl/datafile/example.259.979847765
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.979852989
- input datafile file number=00007 name=+DATA/orcl/datafile/tbs2.257.979847755
- channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-02:00:29:35
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.267.979847755
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.979847755
- input datafile file number=00006 name=+DATA/orcl/datafile/tbs1.256.979847755
- channel ORA_SBT_TAPE_2: starting piece 1 at 2018-07-02:00:29:35
- channel ORA_SBT_TAPE_2: finished piece 1 at 2018-07-02:00:31:20
- piece handle=3ht6usrf_1_1 tag=T9 comment=API Version 2.0,MMS Version 10.3.0.2
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:01:45
- channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-02:00:31:50
- piece handle=3gt6usre_1_1 tag=T9 comment=API Version 2.0,MMS Version 10.3.0.2
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:02:15
- Finished backup at 2018-07-02:00:31:50
- Starting Control File and SPFILE Autobackup at 2018-07-02:00:31:50
- piece handle=c-1359978017-20180702-03 comment=API Version 2.0,MMS Version 10.3.0.2
- Finished Control File and SPFILE Autobackup at 2018-07-02:00:32:25
- RMAN> run {
- 2> allocate channel c1 device type sbt PARMS 'ENV=(OB_MEDIA_FAMILY=station86)';
- 3> allocate channel c2 device type sbt PARMS 'ENV=(OB_MEDIA_FAMILY=station86)';
- 4> backup tag 'T10' database filesperset 2;
- 5> }
- released channel: ORA_SBT_TAPE_1
- released channel: ORA_SBT_TAPE_2
- allocated channel: c1
- channel c1: SID=15 device type=SBT_TAPE
- channel c1: Oracle Secure Backup
- allocated channel: c2
- channel c2: SID=49 device type=SBT_TAPE
- channel c2: Oracle Secure Backup
- Starting backup at 2018-07-02:00:33:38
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.268.979853699
- channel c1: starting piece 1 at 2018-07-02:00:33:38
- channel c2: starting full datafile backup set
- channel c2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.267.979847755
- input datafile file number=00007 name=+DATA/orcl/datafile/tbs2.257.979847755
- channel c2: starting piece 1 at 2018-07-02:00:33:38
- channel c1: finished piece 1 at 2018-07-02:00:35:03
- piece handle=3jt6ut32_1_1 tag=T10 comment=API Version 2.0,MMS Version 10.3.0.2
- channel c1: backup set complete, elapsed time: 00:01:25
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.979847755
- input datafile file number=00006 name=+DATA/orcl/datafile/tbs1.256.979847755
- channel c1: starting piece 1 at 2018-07-02:00:35:03
- channel c2: finished piece 1 at 2018-07-02:00:35:03
- piece handle=3kt6ut32_1_1 tag=T10 comment=API Version 2.0,MMS Version 10.3.0.2
- channel c2: backup set complete, elapsed time: 00:01:26
- channel c2: starting full datafile backup set
- channel c2: specifying datafile(s) in backup set
- input datafile file number=00005 name=+DATA/orcl/datafile/example.259.979847765
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.979852989
- channel c2: starting piece 1 at 2018-07-02:00:35:04
- channel c1: finished piece 1 at 2018-07-02:00:35:49
- piece handle=3lt6ut5n_1_1 tag=T10 comment=API Version 2.0,MMS Version 10.3.0.2
- channel c1: backup set complete, elapsed time: 00:00:46
- channel c2: finished piece 1 at 2018-07-02:00:36:09
- piece handle=3mt6ut5o_1_1 tag=T10 comment=API Version 2.0,MMS Version 10.3.0.2
- channel c2: backup set complete, elapsed time: 00:01:05
- Finished backup at 2018-07-02:00:36:09
- Starting Control File and SPFILE Autobackup at 2018-07-02:00:36:09
- piece handle=c-1359978017-20180702-04 comment=API Version 2.0,MMS Version 10.3.0.2
- Finished Control File and SPFILE Autobackup at 2018-07-02:00:36:54
- released channel: c1
- released channel: c2
- RMAN>
复制代码 关于异步IO和同步IO:
默认值:
- SQL> show parameter slave
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- backup_tape_io_slaves boolean FALSE
- dbwr_io_slaves integer 0
复制代码 现象是:
- RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 2;
- new RMAN configuration parameters:
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 2;
- new RMAN configuration parameters are successfully stored
- RMAN>
- RMAN>
- RMAN> backup tag 'T11' tablespace users;
- Starting backup at 2018-07-02:00:41:49
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=15 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=49 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.979852989
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of backup command on ORA_SBT_TAPE_1 channel at 07/02/2018 00:41:49
- ORA-19565: BACKUP_TAPE_IO_SLAVES not enabled when duplexing to sequential devices
复制代码 把backup_tape_io_slaves设为TRUE:
----------------------------------------------------------------------------------------------------------------
第一种一个备份集下面多于一个备份片的情况(copies备份):
- BS Key Type LV Size
- ------- ---- -- ----------
- 77 Full 3.75M
- List of Datafiles in backup set 77
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 4 Full 1505133 2018-07-03:21:03:16 +DATA/orcl/datafile/users.265.979852989
- Backup Set Copy #1 of backup set 77
- Device Type Elapsed Time Completion Time Compressed Tag
- ----------- ------------ ------------------- ---------- ---
- SBT_TAPE 00:01:48 2018-07-03:21:05:04 NO T11
- List of Backup Pieces for backup set 77 Copy #1
- BP Key Pc# Status Media Piece Name
- ------- --- ----------- ----------------------- ----------
- 78 1 AVAILABLE RMAN-DEFAULT-000001 3pt73pgk_1_1
- Backup Set Copy #2 of backup set 77
- Device Type Elapsed Time Completion Time Compressed Tag
- ----------- ------------ ------------------- ---------- ---
- SBT_TAPE 00:01:48 2018-07-03:21:05:04 NO T11
- List of Backup Pieces for backup set 77 Copy #2
- BP Key Pc# Status Media Piece Name
- ------- --- ----------- ----------------------- ----------
- 79 1 AVAILABLE RMAN-DEFAULT-000002 3pt73pgk_1_2
- BS Key Type LV Size
- ------- ---- -- ----------
- 78 Full 10.00M
- SPFILE Included: Modification time: 2018-07-03:21:03:05
- SPFILE db_unique_name: ORCL
- Control File Included: Ckp SCN: 1505191 Ckp time: 2018-07-03:21:05:11
- Backup Set Copy #1 of backup set 78
- Device Type Elapsed Time Completion Time Compressed Tag
- ----------- ------------ ------------------- ---------- ---
- SBT_TAPE 00:00:54 2018-07-03:21:06:05 NO TAG20180703T210511
- List of Backup Pieces for backup set 78 Copy #1
- BP Key Pc# Status Media Piece Name
- ------- --- ----------- ----------------------- ----------
- 80 1 AVAILABLE RMAN-DEFAULT-000001 c-1359978017-20180703-00
- Backup Set Copy #2 of backup set 78
- Device Type Elapsed Time Completion Time Compressed Tag
- ----------- ------------ ------------------- ---------- ---
- SBT_TAPE 00:00:54 2018-07-03:21:06:05 NO TAG20180703T210511
- List of Backup Pieces for backup set 78 Copy #2
- BP Key Pc# Status Media Piece Name
- ------- --- ----------- ----------------------- ----------
- 81 1 AVAILABLE RMAN-DEFAULT-000002 c-1359978017-20180703-01
- RMAN>
复制代码 -------------------------------------------------------------------------------------------
克服备份优化的副作用(force):
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 79 Full 3.53M DISK 00:00:00 2018-07-03:21:18:33
- BP Key: 82 Status: AVAILABLE Compressed: NO Tag: TAG20180703T211832
- Piece Name: +FRA/orcl/backupset/2018_07_03/nnndf0_tag20180703t211832_0.333.980543913
- List of Datafiles in backup set 79
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 4 Full 1506314 2018-07-03:21:18:33 +DATA/orcl/datafile/users.265.979852989
- RMAN> backup backupset 79;
- Starting backup at 2018-07-03:21:19:14
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=139 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=12 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- skipping backup set key 79; already backed up 1 time(s)
- Finished backup at 2018-07-03:21:19:25
- RMAN> backup backupset 79 force delete input;
- Starting backup at 2018-07-03:21:21:26
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: input backup set: count=123, stamp=980543913, piece=1
- channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-03:21:21:27
- channel ORA_SBT_TAPE_1: backup piece +FRA/orcl/backupset/2018_07_03/nnndf0_tag20180703t211832_0.333.980543913
- piece handle=3rt73qd9_1_2 comment=API Version 2.0,MMS Version 10.3.0.2
- channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-03:21:22:22
- channel ORA_SBT_TAPE_1: backup piece complete, elapsed time: 00:00:55
- deleted backup piece
- backup piece handle=+FRA/orcl/backupset/2018_07_03/nnndf0_tag20180703t211832_0.333.980543913 RECID=82 STAMP=980543913
- Finished backup at 2018-07-03:21:22:23
- Starting Control File and SPFILE Autobackup at 2018-07-03:21:22:23
- piece handle=c-1359978017-20180703-03 comment=API Version 2.0,MMS Version 10.3.0.2
- Finished Control File and SPFILE Autobackup at 2018-07-03:21:22:58
- RMAN> list backupset 79;
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 79 Full 3.53M SBT_TAPE 00:00:00 2018-07-03:21:18:33
- BP Key: 84 Status: AVAILABLE Compressed: NO Tag: TAG20180703T211832
- Handle: 3rt73qd9_1_2 Media: station86-000005
- List of Datafiles in backup set 79
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 4 Full 1506314 2018-07-03:21:18:33 +DATA/orcl/datafile/users.265.979852989
复制代码 -------------------------------------------------------------------------------
压缩备份实验:
- select bytes/1024/1024 from
- dba_data_files where tablespace_name='SYSTEM';
- select sum(bytes)/1024/1024 from
- dba_free_space where tablespace_name='SYSTEM';
复制代码 文件本身690M,RMAN不压缩598.5
- Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jul 3 21:38:48 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1359978017)
- RMAN> backup tag '1T_SYSTEM_FULL' tablespace system ;
- Starting backup at 2018-07-03:21:38:55
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=93 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=13 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.268.979853699
- channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-03:21:39:06
- channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-03:21:40:31
- piece handle=3ut73rjq_1_1 tag=1T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.3.0.2
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:25
- Finished backup at 2018-07-03:21:40:31
- Starting Control File and SPFILE Autobackup at 2018-07-03:21:40:31
- piece handle=c-1359978017-20180703-04 comment=API Version 2.0,MMS Version 10.3.0.2
- Finished Control File and SPFILE Autobackup at 2018-07-03:21:41:06
- RMAN> list backup;
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 82 Full 598.50M SBT_TAPE 00:01:15 2018-07-03:21:40:21
- BP Key: 86 Status: AVAILABLE Compressed: NO Tag: 1T_SYSTEM_FULL
- Handle: 3ut73rjq_1_1 Media: station86-000007
- List of Datafiles in backup set 82
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 Full 1507111 2018-07-03:21:39:06 +DATA/orcl/datafile/system.268.979853699
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 83 Full 10.00M SBT_TAPE 00:00:31 2018-07-03:21:41:02
- BP Key: 87 Status: AVAILABLE Compressed: NO Tag: TAG20180703T214031
- Handle: c-1359978017-20180703-04 Media: station86-000007
- SPFILE Included: Modification time: 2018-07-03:21:38:55
- SPFILE db_unique_name: ORCL
- Control File Included: Ckp SCN: 1507155 Ckp time: 2018-07-03:21:40:31
- RMAN>
复制代码 BASIC压缩:
- RMAN> backup as compressed backupset tag '2TC_SYSTEM_FULL' tablespace system ;
- Starting backup at 2018-07-03:21:44:34
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting compressed full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.268.979853699
- channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-03:21:44:34
- channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-03:21:45:29
- piece handle=40t73ru2_1_1 tag=2TC_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.3.0.2
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:55
- Finished backup at 2018-07-03:21:45:29
- Starting Control File and SPFILE Autobackup at 2018-07-03:21:45:29
- piece handle=c-1359978017-20180703-05 comment=API Version 2.0,MMS Version 10.3.0.2
- Finished Control File and SPFILE Autobackup at 2018-07-03:21:46:14
复制代码- RMAN> list backup;
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 82 Full 598.50M SBT_TAPE 00:01:15 2018-07-03:21:40:21
- BP Key: 86 Status: AVAILABLE Compressed: NO Tag: 1T_SYSTEM_FULL
- Handle: 3ut73rjq_1_1 Media: station86-000007
- List of Datafiles in backup set 82
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 Full 1507111 2018-07-03:21:39:06 +DATA/orcl/datafile/system.268.979853699
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 83 Full 10.00M SBT_TAPE 00:00:31 2018-07-03:21:41:02
- BP Key: 87 Status: AVAILABLE Compressed: NO Tag: TAG20180703T214031
- Handle: c-1359978017-20180703-04 Media: station86-000007
- SPFILE Included: Modification time: 2018-07-03:21:38:55
- SPFILE db_unique_name: ORCL
- Control File Included: Ckp SCN: 1507155 Ckp time: 2018-07-03:21:40:31
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 84 Full 180.00M SBT_TAPE 00:00:51 2018-07-03:21:45:25
- BP Key: 88 Status: AVAILABLE Compressed: YES Tag: 2TC_SYSTEM_FULL
- Handle: 40t73ru2_1_1 Media: station86-000007
- List of Datafiles in backup set 84
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 Full 1507336 2018-07-03:21:44:34 +DATA/orcl/datafile/system.268.979853699
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 85 Full 10.00M SBT_TAPE 00:00:41 2018-07-03:21:46:10
- BP Key: 89 Status: AVAILABLE Compressed: NO Tag: TAG20180703T214529
- Handle: c-1359978017-20180703-05 Media: station86-000007
- SPFILE Included: Modification time: 2018-07-03:21:38:55
- SPFILE db_unique_name: ORCL
- Control File Included: Ckp SCN: 1507369 Ckp time: 2018-07-03:21:45:29
- RMAN>
复制代码
|
|