Backup and Recovery Strategies.docx

上传人:b****8 文档编号:10291304 上传时间:2023-02-09 格式:DOCX 页数:19 大小:25.75KB
下载 相关 举报
Backup and Recovery Strategies.docx_第1页
第1页 / 共19页
Backup and Recovery Strategies.docx_第2页
第2页 / 共19页
Backup and Recovery Strategies.docx_第3页
第3页 / 共19页
Backup and Recovery Strategies.docx_第4页
第4页 / 共19页
Backup and Recovery Strategies.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

Backup and Recovery Strategies.docx

《Backup and Recovery Strategies.docx》由会员分享,可在线阅读,更多相关《Backup and Recovery Strategies.docx(19页珍藏版)》请在冰豆网上搜索。

Backup and Recovery Strategies.docx

BackupandRecoveryStrategies

BackupandRecoveryStrategies

Thischapteroffersguidelinesandconsiderationsfordevelopinganeffectivebackupandrecoverystrategy.

Thissectionincludesthefollowingtopics:

∙DataRecoveryStrategyDeterminesBackupStrategy

∙PlanningDataRecoveryStrategy

∙PlanningBackupStrategy

∙ValidatingYourDataRecoveryStrategy

DataRecoveryStrategyDeterminesBackupStrategy

Todecideonbackupstrategies,startwithyourdatarecoveryrequirementsandyourdatarecoverystrategy.Eachtypeofdatarecoverywillrequirethatyoutakecertaintypesofbackup.

Failurescanrunthegamutfromusererror,datafileblockcorruptionandmediafailuretosituationslikethecompletelossofadatacenter.Howquicklyyoucanresumenormaloperationofyourdatabaseisafunctionofwhatkindsofrestoreandrecoverytechniquesyouincludeinyourplanning.Eachrestoreandrecoverytechniquewillimposerequirementsonyourbackupstrategy,includingwhichfeaturesoftheOracledatabaseyouusetotake,storeandmanageyourbackups.

Whenthinkingaboutrecoverystrategies,askyourselfquestionslikethese:

∙Ifadiskfailedanddestroyedsomeofthedatabasefiles,suchasdatafilesorredologs,howwouldyourecoverthelostfiles?

Asdescribedin"PlanningaResponsetoMediaFailure:

RestoreandMediaRecovery",youshouldbeabletohandlethelossofdatafiles,controlfiles,andonlineredologs.

∙Ifalogicerrorinanapplicationorausererrorcausedthelossofimportantdatafromoneorseveraltablesortablespaces,howcouldyourecoverthatdata,andwhatwouldhappentodatabaseupdatessincetheerror?

Couldyoudeterminethecauseoftheerror,topreventitfromhappeningagain?

Asdescribedin"PlanningaResponsetoUserError:

Point-in-TimeRecoveryandFlashbackFeatures",techniquesavailabletoyouincludepoint-in-timerecoveryofthewholedatabaseoroneormoretablespaces,importingdatafromearlierlogicalexportswithoneofthedataimportutilities,andusingtheOracledatabase'sflashbackfeatures.

∙Iftheinstancealertlogindicatesthatoneormoretablescontainscorruptblocks,howcanyourepairthecorruption?

Doesthetablespacehavetoremainavailableduringtherepair?

Asdescribedin"PlanningaResponsetoDatafileBlockCorruption:

BlockMediaRecovery",theRMANBLOCKRECOVERcommandcanhelpyouinthissituation.Also,troubleshootrecoverywiththeSQL*PlusRECOVER...TESTcommand.

∙Iftheentiredatacenterisdestroyed,canyouperformdisasterrecovery?

Assumethatallyouhaveisanarchivetapecontainingbackups.Howwouldyourecoverthedatabase?

Howlongwouldthatrecoverytake?

∙Ifyouwerenotavailabletorecoveryourdatabase,couldsomeoneelserecoveritinyourabsence?

Areyourrecoveryproceduressufficientlyautomatedanddocumented?

Withtheseneedsinmind,decidehowyoucantakeadvantageoffeaturesrelatedtobackupandrecovery,andlookathoweachfeaturemeetssomerequirementofyourbackupstrategy.Forexample:

∙UsingRecoveryManagersimplifiesmostbackupandrecoveryoperationscomparedtouser-managedbackupandrecovery.Itautomatesmanagementofmostbackupfiles,includingthedeletionofbackupsandarchivedredologsfromdiskortapewhennolongerneededtomeetrecoverygoals.Itprovidesdetailedreportingonbackupactivities,canverifythatyouravailablebackupscanbeusedtorecoveryourdatabase.Finally,RMANmakespossiblemanyrecoverytechniquesnotavailableifyouareusinguser-managedbackupandrecovery,suchasincrementalbackups.

∙FlashbackDatabasewillhelpyourestoreadatabasetoaprevioustimemuchfasterthanmediarecovery.However,youmustdecideinadvancetokeepflashbacklogs,andkeepingflashbacklogsrequiresthatyouconfigureaflashrecoveryarea.

∙Blockmediarecoverymaybebetterthandatafilemediarecoveryifavailabilityiscritical.WhileblockmediarecoveryispossibleevenifyoudonotbaseyourbackupandrecoverystrategyonRMAN,RMAN-basedblockmediarecoverycanbeperformedmorequicklyandwithlesseffort.

Onceyoudecidewhichfeaturestouseinyourrecoverystrategy,youcanplanyourbackupstrategy,answeringthefollowingquestions,amongothers:

∙Howandwherewillyoustoreyourrecovery-relatedfiles?

Willyouuseaflashrecoveryarea?

WillyouuseanASMdiskgroup?

Willyoustorebackupsontapeorotherofflinestorage,oronlyondisk?

∙Atwhatintervalswillyoutakescheduledbackups?

Andwhatformofphysicalbackupswillyoutakeineachsituation?

∙Whatsituationsrequireyoutotakeadatabasebackupoutsideoftheregularschedule?

Sometimesyoumusttakeanunscheduledbackuptoensurethatyoucanrecoveryourdata,suchasafteranOPENRESETLOGSorafterchangestoyourdatabasesuchasNOLOGGINGoperationsthatdonotappearintheredolog.Youmayalsohavebusinessrequirementsthatrequirebackupsforauditingpurposesorotherreasonsnotrelatedtodatabaserecovery.

∙Howcanyouvalidateyourbackups,toensurethatyoucanrecoveryourdatabasewhennecessary?

∙Howdoyoumanagerecordsofyourbackups?

∙Doyouhavedetailedrecoveryplansthatcovereachtypeoffailure?

HowdoyourDBAscanexecutetheseplansinacrisis?

Canscriptsbewrittentoautomateexecutionoftheseplansinacrisis?

∙CanyouapplyOracledatabaseavailabilitytechnologies,suchasDataGuardorRealApplicationClusters,toimproveavailabilityduringadatabasefailure?

Howdoesusingtheseavailabilitytechnologiesaffectyourbackupandrecoverystrategy?

Theseareofcourseonlyafewoftheconsiderationsyoushouldtakeintoaccount.Availableresources(hardware,media,staff,budget,andsoon)willalsobefactorsinyourdecision.

PlanningDataRecoveryStrategy

Yourdatarecoverystrategyshouldincluderesponsestoanynumberofdatabasefailurescenarios.Thekeytoaneffective,efficientstrategyisenvisioningfailuremodes,matchingOracledatabaserecoverytechniquesandtoolstothefailuremodesinwhichtheyareuseful,andthenmakingsureyouincorporatethenecessarybackuptypestosupportthoserecoverytechniques.

Tohelpmatchfailuremodestorecoverytechniquesthatcanhelpresolvethem,refertothefollowingsections:

∙PlanningaResponsetoUserError:

Point-in-TimeRecoveryandFlashbackFeatures

∙PlanningaResponsetoMediaFailure:

RestoreandMediaRecovery

∙PlanningaResponsetoDatafileBlockCorruption:

BlockMediaRecovery

PlanningaResponsetoUserError:

Point-in-TimeRecoveryandFlashbackFeatures

Yourbackupandrecoverystrategyshouldenableyoutohandlesituationsinwhichauserorapplicationmakesunwantedchangestodatabasedata,suchasdeletingthecontentsofatableormakingincorrectupdatesduringabatchrun.Thegoalinsuchacasewillbetorestoretheaffectedpartsofyourdatabasetotheirstatebeforetheusererror.

Dependingonthesituation,yourappropriateresponsewillbeoneofthefollowing:

∙Ifyouhaveperformedalogicalbackupbyexportingthecontentsoftheaffectedtables,sometimesyoucanimportthedatabackintothetable.Thistechniquepresumesthatyouareregularlyexportinglogicalbackupsofyourdata,andthatanychangesbetweenexportsareunimportant.

∙Youcanperformpoint-in-timerecovery,bringingonetablespaceorthewholedatabasebacktoitsstatebeforethetimeoftheerror.Ineithercase,youneedbackupsfrombeforethetimeoftheerror,plustheredologsfromthetimeofthebackuptothetimeoftheerror.

Note:

Oracle'sFlashbackTechnologyprovidesfasterandlessdisruptivealternativestomediarecoveryinmanycircumstances.

∙OracleFlashbackDatabaseisaphysical-levelrecoverymechanismsimilartomediarecovery,butgenerallyfasterandnotrequiringtherestoreofdatafrombackup.

∙OracleFlashbackTableandOracleFlashbackDropworkatthelogicallevel,undoingunwantedchangestotables,includingreversingtheeffectsofDROPTABLEstatements.

∙OracleFlashbackQueryandOracleFlashbackVersionQueryareusefulinviewingpastcontentsoftablesandinvestigatinghowandwhenlogicalcorruptionsaffectedyourdatabase.

InformationaboutthesefeaturesiscollectedinOracleDatabaseBackupandRecoveryAdvancedUser'sGuide.Thisdocumentwillalludetosuchfeatureswheretheycanbehelpfulandprovidepointersformoreinformation.Familiarizeyourselfwiththesefeaturesbeforeplanningyourbackupandrecoverystrategy,becauseyoumayfindthattheycanbequitevaluableandrequirelimitedadvancedplanning.

PlanningaResponsetoMediaFailure:

RestoreandMediaRecovery

AmediafailureoccurswhenaproblemexternaltothedatabasepreventsOraclefromreadingfromorwritingtoafileduringdatabaseoperations.Typicalmediafailuresincludephysicalfailures,suchasheadcrashes,andtheoverwriting,deletionorcorruptionofadatabasefile.Mediafailuresarelesscommonthanuserorapplicationerrors,butyourbackupandrecoverystrategyshouldprepareforthem.

Thetypeofmediafailuredeterminestherecoverytechniquetouse.Forexample,thestrategyyouusetorecoverfromacorrupteddatafileisdifferentfromthestrategyforrecoveringfromthelossofthecontrolfile.

Example:

OnlineRedoLogRecovery

Themethodofrecoveryfromlossofallmembersofanonlineloggroupdependsonanumberoffactors,suchas:

∙Thestateofthedatabase(open,crashed,closedconsistently,andsoon)

∙Whetherthelostredologgroupwascurrent

∙Whetherthelostredologgroupwasarchived

Forexample:

∙Ifyoulosethecurrentgroup,andthedatabaseisnotclosedconsistently(eitheritisopen,orithascrashed),thenyouwillhavetorestorean

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 化学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1