BackupRecovery With RMAN

Published on May 2016 | Categories: Documents | Downloads: 37 | Comments: 0 | Views: 206
of 24
Download PDF   Embed   Report

BackupRecovery With RMAN

Comments

Content

Backup & Recovery with RMAN

Agenda
Types of failures and #$%& %r!hi'e!'ure $anual (s) #$%& "n-'ape

a!kups in "ra!le

a!kups

a!kups *i'h #$%&

#$%& Configura'ion #$%& #$%&

a!kup s'ra'egies a!kups a' Tier0

+,e-plary re!o(ery s!anarios De-o

Types of failures
.ns'an!e /ailure
0sually !onne!'ed *i'h an "ra!le pro!ess failure

$edia /ailure
Disk failure, s'orage array !on'roller failure e'!)

Blo!k Corrup'ion
0sually !aused

y ugs in "ra!le sof'*are

1u-an error
.n -os' !ases a!!iden'ally dele'ed2upda'ed da'a Da'a ase user or DB%

Disas'er
/ire, flood, ear'h3uake, plane !rash e'!)

Backup in Oracle 5hysi!aloptions a!kups
Cold 6off-line7
 /ull da'a ase only  #e3uire do*n'i-e  Do no' pro(ide fle,i ili'y for poin' in 'i-e re!o(ery 65iT#7

a!kups

1o' 6on-line7
ar!hi(elogs

a!kups
a!kups8 full, in!r) 6!u-ula'i(e, differen'ial7,

 Differen' 'ypes of

 Differen' s!opes8 full da'a ase, 'a lespa!e6s7 or da'afile6s7  Do no' re3uire da'a ase do*n'i-e  Can

e used 'o re!o(er full da'a ase, single2-ul'iple 'a lespa!e6s72da'afile6s7 or a !orrup'ed lo!k e re!o(ered 'o any poin' in 'i-e *i'hin assu-ed a!kup re'en'ion period

 Da'a ase !an

Backup options in Oracle (2
Logi!al

a!kups
a!kup granulari'y

Logi!al !opy of da'a in 'he da'a ase :uppor' for differen' Can

e 'aken ei'her *i'h lega!y +,por'2.-por' 'ools or *i'h Da'a 5u-p 6;0g7

:'and y sys'e-s 6Da'a Guard7
5hysi!al and logi!al s'and y da'a ases

!ow hot "ackups are possi"le#
Server proc. DBWR
Db file Db file Db file

Backup proc.

SGA

LGWR Log archiver

Tapes or disks system

RedoLog

Db file

RedoLog Archived redo logs

RMAN architecture
Target Database

RMAN Client Target Database

RMAN Catalog Schema

Target Database

Auxiliary Database

Catalog Database

Types of RMAN hot "ackups
 Copy or

a!kupse'

 /ull da'a ase  .n!re-en'al
 Can

a!kup

a!kups 6in ;0g 2 le(els a(aila le8 0 and ;7

 Cu-ula'i(e, differen'ial

e used 'o upda'e a !opy of 'he da'a ase

 %r!hi(elog

a!kups a!kups

 Ta lespa!e6s7, da'afile6s7

Differential incremental

Cumulative incremental

Manual vs$ RMAN "ackups
 #$%& ad(an'ages8
 :uppor's in!re-en'al  #$%& on-line

a!kup s'ra'egies

a!kups are no' so hea(y for 'he sys'e- as -anual on-line a!kups lo!ks a!kup, res'ore and re!o(ery opera'ions a!kups

 #$%& !an de'e!' !orrup'ed

 #$%& au'o-a'i!ally 'ra!k da'a ase s'ru!'ure !hanges  5ro(ides easy, au'o-a'ed  ?eeps in(eno'ory of 'aken

 Can sea-lessly *ork *i'h 'hird par'y -edia -anagers

 Disad(an'age8 so-e'hing ne* 'o learn
 #$%& !on!ep's and !o--and syn'a, so-e'i-es are no' in'ui'i(e

On%tape "ackups with RMAN
 #$%& allo*s 'o 'ake on-disk
a!kups
 "n disk

a!kups ou' of 'he o,

 /lash re!o(ery area, if !onfigured, fur'her si-plifies su!h

a!kups are in'eres'ing u' usually no' suffi!ien' for a disas'er re!o(ery

 "n-disk

a!kups !an e -anually sen' 'o 'apes
e (ery 'rou leso-e

 #e!o(ery !an

 #$%& !an sea-lessly *ork *i'h 'hird par'y $edia

$anagers
 $edia $anager Li rary 6$$L7 is re3uired  Differen' !onfigura'ion 'asks for differen' $$Ls

On%tape "ackups with RMAN (2
$any (endors of $edia $anage-en' sof'*are

pro(ide $$Ls
$os' popular are8
Ti(oli :'orage $anager @eri'as &e'Ba!kup +$C &e'Worker

"ra!le :e!ure Ba!kup
@ery ne* and pro a ly no' ye' relia le enough

RMAN &onfiguration
 #$%& !an

e pre!onfigured

 Configura'ion is s'ored in 'he !on'rol file and in 'he re!o(ery

!a'alog 6if used7

 Can fa!ili'a'e

a!kup au'o-a'ion

 $os' useful se''ings8
Setting Retention policy Device type Default device type &ackup optimi'ation Channel device type Maxsetsi'e Default to redundancy disk parallelism to disk off none unlimited ### Recommended on to recovery !indo! of " days disk$sbt prallelism % ### to sbt off sbt parms()###* depends on your database si'e

Controlfile autobackup off

LCG 3D Workshop, Bologna, June 2007 - ;2

RMAN &onfiguration (2 +,a-ple8

configure RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS; configure DEFAULT DEVICE TYPE TO ' !"'; configure DEVICE TYPE ' !"' PARALLELIS# $; configure C%ANNEL DEVICE TYPE & !"' ()r* +'ENV+ ,TDPO-OPTFILE+.o("."i/o0i." *.c0ien".or)c0e.!in."1(o2o("3'; configure DEVICE TYPE DIS4 PARALLELIS# $; configure #A5SETSI6E TO $77 8; configure )rc9i/e0og !)c:u( co(ie for 1e/ice ";(e ' !"' "o 1;

configure con"ro0fi0e )u"o!)c:u( on;

 The S%OW ALL !o--and lis's all #$%& !onfigura'ion se''ings  To !lear a gi(en se''ings append CLEAR a' 'he end of 'he

CONFI8URE !o--and

RMAN "ackup strategies
#$%& allo*s -any 'ypes of .' possi le 'o

a!kups

uild o*n a!kup s'ra'egy 'ha' sui's gi(en da'a ase es' s'ra'egies8 a!kup

There are also "ra!le re!o--ended
.n!re-en'al

a!kup s'ra'egy8 le(el 0 a!kups A le(el ; a!kups 6!u-ula'i(e and2or differen'ial7 and ar!hi(elog a!kups in e'*een) a!kup as !opy of 'he *hole da'a ase A in!re-en'al a!kups used 'o upda'e 'he !opy A ar!hi(ed redo logs)

.n!re-en'ally upda'ed da'a ase !opy8 ;

Backup strategy used at Tier'
 Bo'h "ra!le-re!o--ended s'ra'egies i-ple-en'ed for all

produ!'ion sys'e-s
 Ba!kups go 'o 'apes  Weekly or

 .n!re-en'al

a!kup s'ra'egy8

i*eekly le(el 0 a!kups 6depending on 'he DB siBe7 a!kup in e'*een a!kups

 % le(el ; !u-ula'i(e

 Daily in!re-en'al le(el ; differen'ial  %r!hi(elog

a!kup e(ery 30 -inu'es

 .n!re-en'ally upda'ed DB !opy s'ra'egy8
 daily in!re-en'al differen'ial  Copies, in!re-en'al

a!kups applied *i'h 2 days of delay

/lash #e!o(ery %rea

a!kups and ar!hi(ed redo logs s'ored in 'he

Backup operations at Tier'  Cen'ral -a!hine 'o s!hedule and run all 'he
a!kups
 Cen'ral #$%& !a'alog e,por'ed on regular  +,a-ples of #$%& !o--ands

asis

eing used8

run + crosscheck archivelog all, backup force tag )some_tag-.T/ incremental level . check logical database force format /0d-0T-01-lvl.T/ plus archivelog format /0d-0T-01-lvl.Tarch/, delete noprompt force archivelog all completed before 2sysdate 3 %4, 5 run + crosscheck archivelog all, backup tag )some_tag- D/ incremental level database format /0d-0T-01-lvl D/ plus archivelog format /0d-0T-01-lvl Darch/, delete noprompt force archivelog all completed before )sysdate 6 %*, 5

Backup operations at Tier' (2
run + backup tag )some_tag-AR/ archivelog all format /0d-0T-01-arch/, delete noprompt force archivelog all completed before )sysdate 3 %*, 5

run + backup maxsetsi'e %.789 tag / D&-Copy-tag/ device type disk incremental level for recover of copy !ith tag )D&-Copy-tag* database, recover device type disk copy of database !ith tag D&-Copy-tag until time )sysdate 3% ), delete force noprompt backupset device type disk tag D&-Copy-tag completed before )sysdate 3%*, 5

&o(plete data"ase recovery  &eeded *hen8
 %ll da'afiles are los' or 'he :C:T+$ 'a lespa!e da'afiles are los'  %' leas' one -e- er of ea!h redo log group sur(i(ed

 #e3uires8
 Con'rol file re!o(ery 6if i'Ds los'7  Da'afile res'ore fro- a

a!kup a!kups and2or ar!hi(ed

 Da'a ase re!o(ery using in!re-en'al

redo logs and online redo logs

startup mount run + allocate channel c device type disk$sbt, allocate channel c% device type disk$sbt, restore database check readonly, recover database, alter database open, 5

 &eeded *hen8 )ata"ase point%in%ti(e recovery
 all da'afiles are los'  %ll !opies of 'he !urren' !on'rol file are los'  "r all online redo log group -e- ers are los'

 The -os' 'ypi!al re!o(ery in !ase of sys'e-s i-ple-en'ing :%$+ approa!h  .f done af'er a disas'er i' has 'o
 1ard*are !onfigura'ion  ": and "ra!le sof'*are ins'alla'ion  #e-!rea'ion or res'ore fro- non-#$%&

e pre!eded y8

o'her i-por'an' !onfigura'ion files

a!kup of lis'ener)ora, 'nsna-es)ora and

 %:$ ins'an!e and diskgroup !onfigura'ion 6if needed7  $$L ins'alla'ion and !onfigura'ion  )))

 #e3uires
 :pfile res'ore  Con'rolfile res'ore  Da'afiles res'ore and re!o(ery

set dbid(xxxxxxx startup nomount, run + allocate channel c device type disk$sbt, restore spfile to )some_location* from autobackup, recover database, alter database open resetlogs, 5 shutdo!n immediate, startup nomount, run + allocate channel c device type disk$sbt, restore controlfile from autobackup, alter database mount, 5 run + set until time ( 4to-date:/%73A193%..; ..<..<../=/dd3mon3yyyy hh%7<mi<ss/>4, allocate channel c device type disk$sbt, allocate channel c% device type disk$sbt, restore database check readonly, recover database, alter database open resetlogs, 5

Ta"lespace point%in%ti(e recovery
&eeded
$ainly 'o address a hu-an error

"ra!le -akes effor's 'o au'o-a'e i'
Can

e done *i'h fe* !li!ks in "+$

#e3uires
5oin' in 'i-e re!o(ery of 'he *hole da'a ase

6an au,iliary ins'an!e is !rea'ed7
+,por'2i-por' of sele!'ed 'a lespa!es s!he-as

or o Ee!'s

Block (edia  &eeded *hen8 recovery
 Da'a ase repor's ei'her single or -ul'i

lo!k !orrup'ion

 Can

e done *i'h an open da'a ase lo!ks are no'

 "nly 'he 'a le6s7 !on'aining !orrup'ed

a(aila le

 Da'a ase !orrup'ions !an  Corrup'ed

e dis!o(ered *i'h #$%& !)c:u( /)0i1)"e 1)")!) e !o--and lo!ks !an e found in @FD%T%B%:+GBL"C?GC"##05T."&
@RA3. A8B< @RACCD data block corrupted :file E ?= block E 77> @RA3. .< data file ?< )d<ForacleForadataFdataFmydb-maintbs-. #dbf* run + allocate channel c device type disk$sbt, blockrecover datafile ? block 77, 5

*ingle+(ultiple  &eeded *hen datafile+ta"lespace recovery
 :ingle2-ul'iple 'a lespa!es or da'afiles ha(e  :C:T+$ 'a lespa!e is in'a!'  Con'rolfiles and online redo logs are in'a!'

een los'

 #e3uires
 To pu' offline da'afiles and 'a lespa!es  The da'a ase !an

eing re!o(ered

e open and a(aila le 'o users

run + sGl 2alter tablespace users offlineH, allocate channel c device type disk$sbt, restore tablespace users, recover tablespace users, sGl 2alter tablespace users onlineH, 5

More info  Oracle Database 10g RMAN
Backup & Recovery ( y $a'he* 1ar' and #o er' G) /ree-an7
 "ra!le Do!u-en'a'ion
 Backup and Recovery Basics  Backup and Recovery Advanced

User s !uide
 Backup and Recovery Re"erence

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close