在RMAN的备份中,可以经由过程Exclude呼吁解除某些不需要备份的表空间。
1 j" F8 D. ?8 Q9 W* n 这样可以缩减备份的容量,对备份进行恰当优化和调整。( m' @3 H9 A# G) J/ D K+ T
解除某个表空间可以使用近似如下呼吁:
V' }' C( i: w5 X1 a9 S$ g. q configure exclude for tablespace users;# H8 R! K: r! u! ~- _, M
其设置可以在RMAN中经由过程show exclude呼吁来查看。
! U" \& U$ v* t; o5 s 如不美观未来想姑且增添解除表空间的备份,站提醒: 可以经由过程以下呼吁实现:
& U( Q0 I5 m) m' [0 v backup database noexclude;
: K! B' B9 m; \+ p 如不美观想打消解除设置则可以使用如下呼吁:
& c4 f# p4 L& X; a( J0 z CONFIGURE EXCLUDE FOR TABLESPACE users CLEAR;
" T' F4 H2 C. {: y6 `4 ^ 此外常用的解除备份呼吁还有:
3 P5 K9 A9 g/ q BACKUP DATABASE SKIP READONLY, SKIP OFFLINE;% Y" e1 j$ \* U8 q# s" d6 p
以下是一个简单的测试过程。( K- G$ E- ]8 n# a
执行备份:
) g& B1 I. H0 z0 m [oracle@test126 udump]$ rman target /! I: T2 X9 S; u) |$ Z# M1 V
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Oct 9 06:47:19 2006
0 U2 c; D! n! t) x" M* a0 Q' f Copyright (c) 1982, 2005, Oracle. All rights reserved.
6 m7 w* P" h2 K% R6 i) u# h; C connected to target database: EYGLE (DBID=2590148133)
3 ]. s0 ?, h$ C& j( b RMAN> configure exclude for tablespace users;+ L: @5 W* P1 w9 B/ R1 C
using target database control file instead of recovery catalog r z6 s; h( [/ P4 r
tablespace USERS will be excluded from future whole database backups
! h# X$ V8 a/ z2 \- j& C' g new RMAN configuration parameters are successfully stored
* a6 N6 [5 b7 H# w; z& V% Y RMAN> backup full database;# e3 d" H2 }3 x( [3 D4 F
Starting backup at 09-OCT-06
; C5 ~) e2 I- |( _5 r7 ~/ `9 Q allocated channel: ORA_DISK_1
& | a( ^% Z: }# l channel ORA_DISK_1: sid=527 devtype=DISK4 d' P4 j# @/ h0 q9 U( H
file 4 is excluded from whole database backup5 x) H3 F! }1 A# y) O+ S
channel ORA_DISK_1: starting full datafile backupset
7 v1 r; e6 I4 T+ u3 l1 \1 x channel ORA_DISK_1: specifying datafile(s) in backupset4 O7 s( b1 | ]. R/ J* t9 s
input datafile fno=00001 name=/opt/oracle/oradata/eygle/system01.dbf; m: Y& R: J3 o$ I- ~/ l2 {
input datafile fno=00003 name=/opt/oracle/oradata/eygle/sysaux01.dbf
) F3 Q; i! i! o# v: V input datafile fno=00002 name=/opt/oracle/oradata/eygle/undotbs01.dbf
3 y9 ^7 T. ~( w channel ORA_DISK_1: starting piece 1 at 09-OCT-06) F9 d7 ~: g1 l0 B4 J. g
channel ORA_DISK_1: finished piece 1 at 09-OCT-06
+ h3 F4 s& o) G4 r piece handle=/opt/oracle/flash_recovery_area/EYGLE/backupset/+ D; y) e$ {; S. }& U' W
2006_10_09/o1_mf_nnndf_TAG20061009T070612_2lm135od_.bkp tag=TAG20061009T070612 comment=NONE, w. F# f( c1 ~4 N2 m2 i, V
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:48
7 \% D4 o! u; K% k) T/ H2 V channel ORA_DISK_1: starting full datafile backupset7 i" S' w9 T% z0 r: n8 Y* B
channel ORA_DISK_1: specifying datafile(s) in backupset
. Y- B. B) O% v# h/ E6 O1 e( A! i including current control file in backupset, r" I1 k% i9 A3 V1 B1 l
channel ORA_DISK_1: starting piece 1 at 09-OCT-06, h% ?2 X X* S' ~: h& ]" [3 q; y
channel ORA_DISK_1: finished piece 1 at 09-OCT-06
) s% H. @9 u; ?! N. {4 U piece handle=/opt/oracle/flash_recovery_area/EYGLE/backupset/
' f5 N9 d5 |, s. O1 @ 2006_10_09/o1_mf_ncnnf_TAG20061009T070612_2lm14ppc_.bkp tag=TAG20061009T070612 comment=NONE8 L( e4 [& X( p3 t$ U1 p. @
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
- s- ^2 u( [4 H7 x1 m; s1 Y, K Finished backup at 09-OCT-06
$ j2 }. v" @0 { RMAN> exit% e, d% d- G/ u( }, z- m: J
Recovery Manager complete.
; m+ ^+ \! b9 @ 然后封锁数据库,我们可以进行一次恢复考试考试:: l! ~8 ]8 b4 d* }# y$ O' W" m
[oracle@test126 udump]$ sqlplus "/ as sysdba"
c# O1 J+ i T, j6 N% _0 t7 P2 _+ S7 X1 g SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 9 07:07:28 20061 r' Q% g' ?2 H; u) i5 f" `8 u
Copyright (c) 1982, 2005, Oracle. All rights reserved.- s' L2 r% a+ Y. V) ^# o) m" K
Connected to:5 i9 e* R; ]# F
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production+ J( @8 `, }, K( D, J
With the Partitioning and Data Mining options y; ]6 a4 o6 Y$ A- M
SQL> select name from v$datafile; |