Sunteți pe pagina 1din 27

The Definitive Guide To

tm tm

Windows Application and Server Backup 2.0


Don Jones

Introduction

IntroductiontoRealtimePublishers
by Don Jones, Series Editor

Forseveralyearsnow,Realtimehasproduceddozensanddozensofhighqualitybooks thatjusthappentobedeliveredinelectronicformatatnocosttoyou,thereader.Weve madethisuniquepublishingmodelworkthroughthegeneroussupportandcooperationof oursponsors,whoagreetobeareachbooksproductionexpensesforthebenefitofour readers. Althoughwevealwaysofferedourpublicationstoyouforfree,dontthinkforamoment thatqualityisanythinglessthanourtoppriority.Myjobistomakesurethatourbooksare asgoodasandinmostcasesbetterthananyprintedbookthatwouldcostyou$40or more.Ourelectronicpublishingmodeloffersseveraladvantagesoverprintedbooks:You receivechaptersliterallyasfastasourauthorsproducethem(hencetherealtimeaspect ofourmodel),andwecanupdatechapterstoreflectthelatestchangesintechnology. Iwanttopointoutthatourbooksarebynomeanspaidadvertisementsorwhitepapers. Wereanindependentpublishingcompany,andanimportantaspectofmyjobistomake surethatourauthorsarefreetovoicetheirexpertiseandopinionswithoutreservationor restriction.Wemaintaincompleteeditorialcontrolofourpublications,andImproudthat weveproducedsomanyqualitybooksoverthepastyears. Iwanttoextendaninvitationtovisitusathttp://nexus.realtimepublishers.com,especially ifyouvereceivedthispublicationfromafriendorcolleague.Wehaveawidevarietyof additionalbooksonarangeoftopics,andyouresuretofindsomethingthatsofinterestto youanditwontcostyouathing.WehopeyoullcontinuetocometoRealtimeforyour educationalneedsfarintothefuture. Untilthen,enjoy. DonJones

Table of Contents IntroductiontoRealtimePublishers.................................................................................................................i Chapter1:Introduction.........................................................................................................................................1 ThePhilosophyofBackup...............................................................................................................................2 WhyBackup1.0IsNoLongerEnough.......................................................................................................3 BackupWindows............................................................................................................................................3 NonContinuous..............................................................................................................................................5 JusttheDataNottheApplication.........................................................................................................5 DisasterRecoveryIsTooInflexible........................................................................................................6 Backup1.0:TheVerdict...............................................................................................................................7 BackupBasics........................................................................................................................................................7 WhyBackUp?...................................................................................................................................................7 WhatDoYouBackUp?.................................................................................................................................8 WhenDoYouBackUp?.............................................................................................................................10 WhatTypeofBackupWillYouUse? ....................................................................................................11 WhereDoYouStoreBackups?...............................................................................................................13 ShouldYouTestBackups?.......................................................................................................................13 AreYouKeepinganEyeonYourBackups?......................................................................................14 ApproachestoBackingUp............................................................................................................................16 FileBasedBackups.....................................................................................................................................16 ImageBackups..............................................................................................................................................17 ApplicationSpecificIdeas........................................................................................................................18 OurBackup2.0WishList..............................................................................................................................21 WhatsAhead......................................................................................................................................................22

ii

Copyright Statement

Copyright Statement
2009 Realtime Publishers. All rights reserved. This site contains materials that have been created, developed, or commissioned by, and published with the permission of, Realtime Publishers (the Materials) and this site and any such Materials are protected by international copyright and trademark laws. THE MATERIALS ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. The Materials are subject to change without notice and do not represent a commitment on the part of Realtime Publishers or its web site sponsors. In no event shall Realtime Publishers or its web site sponsors be held liable for technical or editorial errors or omissions contained in the Materials, including without limitation, for any direct, indirect, incidental, special, exemplary or consequential damages whatsoever resulting from the use of any information contained in the Materials. The Materials (including but not limited to the text, images, audio, and/or video) may not be copied, reproduced, republished, uploaded, posted, transmitted, or distributed in any way, in whole or in part, except that one copy may be downloaded for your personal, noncommercial use on a single computer. In connection with such use, you may not modify or obscure any copyright or other proprietary notice. The Materials may contain trademarks, services marks and logos that are the property of third parties. You are not permitted to use these trademarks, services marks or logos without prior written consent of such third parties. Realtime Publishers and the Realtime Publishers logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. If you have any questions about these terms, or if you would like information about licensing materials from Realtime Publishers, please contact us via e-mail at info@realtimepublishers.com.

iii

Chapter 1

Chapter1:Introduction
Thefirstbackuptechnicallywasaround1951,whenthefirstgenerationofdigital computingappearedintheformofUNIVACI.Thebackups,suchastheywere,werethe punchcardsusedtofeedinstructionstothemassivemachine.Oncecomputersbeganto usemoreflexibleformsofstorage,reeltoreelmagnetictapebegantoreplacepunchcards. In1965,IBMintroducedthefirstcomputerharddrives,althoughthroughthe1970s,these devicesremainedimpracticallyexpensivetouseforbackups.Floppydiskscameintousein 1969an8inchmonsterstoringjust80kilobytesofdata.Recordablecompactdisks becameavailableintheearly1990s,andflashdrivesbecamecommonintheearlypartof the21stcentury.Shockingly,magnetictapethesecondoldestformofbackupstorageis stillinusetoday.Figure1.1showsatimelineofdatabackupstorage(excerptedfrom www.backuphistory.com),andyoucanseethattapeisstillaliveandwellandhasbeen foralmost50years.

Figure1.1:Backupstoragetimeline. Theresaninterestingparalleltobedrawnhere:Despitenumeroustechnicaladvancesin storage,wecontinuetorelyononeoftheoldestmediumstostorebackups.Thesame appliestoourbackuptechniquesandprocedures:Despiteadvancesinhowweperform backups,wetendtostillusethesamedecadesoldtechniques,albeitwrappedupinpretty newtools.

Chapter 1 Throughoutcomputinghistory,backupshavebeenpractical,simpleprocedures:Copya bunchofdatafromoneplacetoanother.Complexitiesarisewithalwaysondatalikethe databasesusedbyExchangeServerandSQLServer,andvarioustechniqueshavebeen developedtoaccessthatformofinusedata;however,backupshaveultimatelyalways beenaboutafairlysimple,straightforwardcopy.Evenmagnetictapemuchmore advancedthaninthe1960s,ofcourseisstillaprimaryformofstorageformany organizationsbackups. IcallitBackup1.0essentiallythesamewayweveallbeenmakingbackupssincethe beginningoftime,withtheonlymajorchangesbeingthestoragemediumweuse.Although manybrightengineershavecomeupwithclevervariationsontheBackup1.0theme,its stillbasicallythesame.AndIsayitsnolongerenough.Weneedtorethinkwhywedo backups,andinventBackup2.0anewwaytobackupourdatathatmeetstodays businessneeds.Surprisingly,manyofthetechniquesandtechnologiesthatsupportBackup 2.0alreadyexistwejustneedtoidentifythem,bringthemtogether,andstartusingthem.

ThePhilosophyofBackup
Letsstartwiththequestion,Whydowebackup? Isupposethefirstanswerthatcomestomindissimpleenough:Sothatwedontloseany data.Butthatsnotactuallyanaccurateanswer.Personally,Idontbackthingsupjustso theywillneverbelost;IbackthemupsothatIcancontinueusingthem.Thatsasubtle difference,butanimportantone.Ifyoureonlyconcernedaboutneverlosingdata,Backup 1.0isprobablysufficient:Copyyourdatatoalongtermstoragemediumprobably magnetictapeandstickitinavaultsomewhere.Youcouldcallitarchivingandbemore accurate,really.Butmostorganizationsarentasconcernedaboutarchivingastheyare aboutmakingsurethatdataremainsavailable,whichmeansyounotonlyneedabackup butalsoameansofrestoringthedatatousability.Sotherealanswer,formost organizations,ismorecomplicated:Sothatourdataremainsavailabletousallthetime. ThatswhereBackup1.0thebackuptechniquesandtechnologiesweveallusedforever andarestillnativetooperatingsystems(OSs)likeMicrosoftWindowscanreallyfail. Makingacopyofdataisonething;puttingthatcopybackintoproductionuseisoftentoo slow,toocomplicated,andtoomonolithic.AndthatswhereBackup1.0failsus.Aswestart consideringBackup2.0,andwhatweneedittodo,weneedtobearinmindourreal purposeforbackingup.Ultimately,wedontcareaboutthebackinguppartverymuchat allwecareabouttherestorepartalotmore.

Chapter 1

WhyBackup1.0IsNoLongerEnough
Ourdecadesoldbackuptechniquesarenotsufficientanymore.Theymaybegreatfor creatingbackupsalthoughinmanycases,theyarentevengoodforthatbuttheydonot excelatbringingtherightdatabackintoproductionasquicklyaspossible.Despite advancesinspecializedagents,compressednetworktransmissions,andsoforth,werestill justmakingacopyofthedata,andthatdoesntalwayslenditselfwelltorestoringthedata. Why?

BackupWindows
Oneproblemistheneedforbackupwindows,periodsoftimeinwhichourdataisntbeing usedveryheavily,sothatwecangrabaconsistentcopyofit.Consistencyiscriticalfor backups:Allthedatainanygivencopyneedstobeinternallyconsistent.Wecantbackup halfadatabasenowandtheotherhalflaterbecausethetwohalveswontmatch.Asour datastoresgrowlargerandlarger,however,gettingafullbackupbecomesmoreandmore difficult. MicrosoftsTerraServer,whichstoresandprovidesaccesstosatellitephotographsforthe entireUnitedStates,hasadatastoreinexcessof1terabyte,andevenwithfairlyadvanced backuphardware,itstilltakesalmost8hourstobackitallup.Thatsatotaldata throughputof137GBperhourbutifthatdatawereinconstantuse,itwouldbecomeless practicaltomakeacompletecopyonaregularbasis. Asaworkaround,wecommonlyusedifferentialorincrementalbackups.Theseallowusto grabalotlessdataallatonce,makingiteasiertomakeourbackupcopy.Theproblemis thattheseignoretherealreasonwemadethebackupinthefirstplacetoenableusto restorethatdata.ConsideracommonbackupapproachthatusesSQLServersnative backupcapabilities: Sunday,fullbackup Everyweekdayevening,adifferentialbackup Everyhourduringthedayfrom8amto5pm,alogbackup

Thoseweeknightdifferentialsgrabeverythingthathaschangedsincethelastfullbackup (asopposedtoanincremental,whichgrabseverythingthathaschangedsincethelastfull orthelastincremental).IfsomethinggoeswrongonFridayat4:05pm,theresalotofdata torestore: LastSundaysfullbackupwhichwillbefairlylarge Thursdaysdifferentialwhichwillalsohavegrownquitelarge ThelogbackupsfromFridayat8am,9am,10am,11am,noon,1pm,2pm,3pm,and 4pmthatsninefilesinall,althougheachwillbefairlysmall

Figure1.2illustratesthesedifferentbackuptypes.

Chapter 1

Figure1.2:SQLServerbackuptypes. Thatsatonofworkandatonofwaitingwhiletapesandharddrivesspin,restoringall thatdata.Sure,wewonthavelostmuchjust5minutesworthofworkbutonalarge database(say,aterabyteorso),youcouldeasilybewaitingfor16hoursormore. Andthatsifthebackupsallwork.Tapedrivesandevenharddrivesarenotimmuneto corruption,errors,andfailures,andoneofthemostcommonstoriesintheworldisthe administratorwhorealizedthatthebackuptapeswerenogoodandrealizeditwhile tryingtorestorefromoneofthem.Weallknowthatweshouldtestourbackups,but honestly,doyoudoit?Outofmorethan300consultingclientsIveworkedwithinthepast 10orsoyears,oneofthemhadaregularlyscheduledplantodotestrestores.One.Less thanonepercent.Why? Well,theonecustomerwhodidregularlyscheduledtestrestoreshadadedicated administratorwhodidalmostnothingelse.Afulltestrestoreoftheirenvironment,using Backup1.0styletechniquesandtechnologies,wouldrequiretheentireITteamabouta weektoperform.Thatoneadministratorcouldtestrestorevarioussystems,oneatatime, overthecourseofamonthandthenstartover.Ithinkthatprettymuchanswersthe questionaboutwhysofewpeopletesttheirbackups.Itsasimple:Toomuchdataforfull backupsresultsinworkaroundssuchasdifferentialsandincrementalsthatcontributeto lengthyrestoretimes,whichiswhyweneverbothertotestandwhy,whentherubber hitstheroadandweneedthosebackups,nobodyishappyabouthowlongittakestograb theneededdata.

Chapter 1

NonContinuous
Backup1.0hasanothermajorweakpoint:Itsalwaysapointintime.Asnapshot.Non continuous,inotherwords.ConsideroneapproachtobackingupActiveDirectory(AD), whichIseealotofmycustomersusing: FullbackupofeverydomaincontrollersSystemStateontheweekends.Thisisa quick,fairlysmallbackupevenanexceptionallylargedomaincanbebackedupin afewminutes. Ononeortwodomaincontrollers,atwicedailybackupoftheSystemState.Again, thisoperationisquick.

Theproblemisthatyoualwaysstandtoloseahalfdaysworthofworkbecauseyoure onlytakingsnapshotstwiceaday.Whatifyoujustimportedacoupleofhundrednew usersintothedomain,addedthemtogroups,andassignedthemfilepermissionson variousfileservers?Losingthatworknotonlymeansyouhavetostartover,italsomeans youvegotorphanSecurityIdentifiers(SIDs)floatingaroundonallthosefilepermission AccessControlLists(ACLs).Youllnotonlyhavetorepeatyourwork,youllalsohaveto cleanupallthoseACLs. BusinessestendtodesignbackupstrategiesaroundtheconceptofHowmuchdataarewe willingtolose,andhowmuchworkarewewillingtorepeat?Theresoftenalotless considerationaboutHowquicklydowewanttorestorethedata?andmuchtomy irritation,almostnobodythinkstoanswer,Wedontwanttoloseanydataorrepeatany work!Backup1.0hasconditionedustoacceptdatalossandrepeatedworkasinevitable, andsowedesignbackupschemesthattradeoffbetweentheinevitablelossofdataandthe amountofbackupresourceswewanttodevote.Frankly,theattitudethatIhavetoaccept datalossandrepeatedworkisnonsense.Icantbelievethat,adecadeintothe21stcentury, wereallsocomplacentaboutthatattitude.

JusttheDataNottheApplication
AnotherproblemwithBackup1.0isthatweoftentendtojustbackupdatadatabases, files,SystemState,orwhateverwerarelybackuptheapplicationsthatusethedata.I tookabriefsurveyonmyblogatConcentratedTech.com,andabout95%ofthe respondentssaidtheydontbackupapplicationsbecausetheykeeptheoriginal installationmediasothattheycanalwaysreinstalltheapplicationifnecessary. Really?Letsthinkaboutthat:MicrosoftExchangeServertakesabout45minutestoan hourtoinstallproperly.Thenyouhavetoapplythelatestservicepackanotherhalfhour orsoandanypatchesreleasedsincetheservicepackcallthatanother20to30minutes. Thenyoucanstartrestoringthedata,whichmaytakeanotherfewhours.Ifyoure rebuildinganentireserver,ofcourse,youllhavetostartwithreinstallingWindowsitself, anditsservicepackandpatches,whichwilladdanother2or3hourstotheprocess.The total?Maybeafullworkday.Andforsomereason,peoplefindthatacceptablebecause Backup1.0isallaboutarchiving,really,notrestoring.

Chapter 1 Onevalidcounterargumentisthatmostrestorationsareforjustthedata,orevenapartof thedata(likeasingledatabasetable,orasingleemailmessage),andarentafullon disasterrecoveryrebuild.Well,okaybutdoesthatmeanitsstillacceptableforafullon disasterrecoveryrebuildtotakeafullday?Typicallynot,andthatswhysome organizationswillimagetheirservers,usingsoftwarethattakesasnapshotoftheentire harddriveandoftencompressesittoasmallersize.Usedforyearsasadeployment technique,itworkswellforbackingupanentireserver.Forbackinguptheserverbutoften notrestoringit.Snapshot,orpointintime,imagestaketimetoproduce,andtheserver mayevenhavetobeshutdowntomakeanimagemeaningyoullneedafrequent maintenancewindow.Atraditionalsnapshotimagewontcontainthelatestdata,soeven afterrestoringtheimage,youstillhavetorelyontraditionalbackupstogetyourmost recentdataback.Itjustamazesmethatweaccepttheselimitations.

DisasterRecoveryIsTooInflexible
Closelyrelatedtothepreviousdiscussionisthefactthatpeopledobackupsfortwo differentreasons.Reasonone,whichIthinkisprobablymorecommonlycitedasareason tobackupistorestoresmallpiecesofdata.Youvedoubtlessdonethis:Restoredasingle filethatsomeonedeletedbyaccident,oranemailmessage,oradatabasetable.Nearly everyonehasdealtwiththis,anditisntdifficulttosellthisreasontomanagementwhen acquiringbackuptechnologies. ThesecondreasonisforwhatIcalledfullondisasterrecoveryintheprevioussection. Thisiswhenanentireserveror,goodnesshelpyou,anentiredatacenterislost,and hastoberestoredonsiteoratadifferentlocation.Unfortunately,thislevelofdisasteris actuallyquiterare,anditsatoughsellformanagementiftheorganizationhasnt encounteredthistypeofdisasterinthepast. TheultimateproblemisthatBackup1.0technologieslendthemselvestooneortheother scenariosbutnotusuallytoboth.Inotherwords,ifyouhaveaproductthatdoesgreat baremetalrecovery,itmaynotdosingleitemrecoveryaswell.Someproducts compromiseanddoanokayjobatbothbackinguptheentireservertoenablebaremetal recovery(andoftenprovidingbootableCDsorothertechniquessothatyoucaninitiatea baremetalrecovery),andthenkeepingaseparateindexofeverybackeduppieceofdata tomakesingleitemrecoveryeasier.Frankly,Ivenotusedmanysolutionsthatdoagreat jobatbothtasksandthefactthattheyreallessentiallysnapshotbasedstillmakesthem prettylimited.Ineverwanttohavetoagreethatlosingacertainamountofworkis acceptable.

Chapter 1

Backup1.0:TheVerdict
Ifyourejustarchivingdata,Backup1.0isprettyawesome.Itstartstofail,though,when youneedtorestorethatdata,andwanttodosoinanefficientmannerthatenablesboth singleitemandfullondisasterrecoveryrestoration.Thesnapshotorientednatureof Backup1.0meansyourealwaysatriskoflosingsomework,andthatsnapshotoriented naturealsoimposesrigidrequirementsformaintenanceandbackupwindowswindows thatmightnotalwaysbeinthebusinessbestinterests. Soletsrethinkbackup.Iwanttogobacktobasicsandreallydefinewhatbackupsshould do.ConsiderthisdefinitionawishlistforBackup2.0.

BackupBasics
IhavenodoubtthatyoureaprettyexperiencedadministratororITmanager,andyou mightnotthinkthatbackupbasicsisaparticularlyenticingsection.Bearwithme.Illtry tokeepeachofthefollowingsectionssuccinct,butIreallywanttostepbackfromthe existingtechnologiesandtechniquestofocusonwhatpeopleandbusinessesnot softwarevendorswanttheirbackupprogramstodo.Wevebeendoingbackupsmoreor lessthesamewayforsolongthatIthinkitsbeneficialtojustforgeteverythingweve learnedanddoneandstartoverwithoutanyassumptionsorpreconceptions.

WhyBackUp?
Wevecoveredthistopicprettywell,butletmestateitclearlysothattheresnoconfusion: Backupsshouldpreventusfromlosinganydataorlosingany work,andensurethatwealwayshaveaccesstoourdatawith aslittledowntimeaspossible. Thatstatementimpliesafewbasicbusinesscapabilities: Whenaproblemoccurs,wewanttoexperienceaslittledatalossaspossible Weneedtobeabletorecoverdataasquicklyaspossible Weplaceequalimportanceonrecoveringasinglebitofdataaswedoindealing withacompletedisaster

Chapter 1 ThestatementalsomeansafewthingstraditionallyassociatedwithBackup1.0probably arentacceptable: Snapshotsthatgrabonlyacertainpointintimeimagearelessdesirable Anysystemthatisweightedtowarddisasterrecoveryortowardsingleitem recoveryislessdesirableweneedbothcapabilities Anysystemthatrequireslengthy,multisteprestoreprocessesislessdesirable Backupsthatdonotlendthemselvestosomeformofphysicallyprotectedstorage arelessdesirable Backupsthatrequireshoursandhourstocompletewillrequirehoursandhoursto restorebothofwhicharelessdesirable

Sogivenwhywebackup,wecantakeafreshlookatwhatwebackup.

WhatDoYouBackUp?
EventherelativelyprimitivebackupsoftwareincludedwithWindowsServer2003(and priorversionsofWindows)understoodthatyoudontalwaysneedtobackupeverything everytimeyourunabackup.Figure1.3showshowthatutilityallowedyoutoselectthe itemsyouwantedtobackuporrestoreauserinterface(UI)duplicatedinsomeformby mostcommonlyusedbackupsoftware.

Chapter 1

Figure1.3:SelectingwhattobackuporrestoreinWindowsBackup. Sowhatdoyoubackup?Onanygivenserver,youhavemanychoices: Backuptheentireservereveryfileoneverydisk Backupjustdatasharedfiles,applicationdatabases,andsoforth Backupapplicationsandtheirdataincludingtheapplicationsexecutablefilesand settings BackuptheOSanditssettingsbutnotanyapplicationfilesoranydata

Chapter 1 Thepermutationsarepracticallylimitless.Ifyouresimplyafterarchivingcreating backups,thatisthenanythingthatgrabsthedataisfine.Infact,justgrabbingthedatais probablyallyouneedtodoifallyouwanttodoiscreateapointintimesnapshotfor archivalpurposes.Sure,youcouldbackuptheentireserverandifyourgoalistobeable tohandleafullondisasterorrecoverindividualitems,thenbackinguptheentireserver wouldprovidebothcapabilities.Butbackinguptheentireserverwouldprobablytakealot longer.Itmightnotevenbeentirelypossiblebecausetherewillalwaysbesomeopenfiles, runningexecutables,andotheritemsthatBackup1.0stylebackuptechniquescantgetto. Somaybebackinguptheentireserverisntreallypractical.Afterall,wecanalways reinstalltheOSandanyapplicationsfromtheiroriginalmedia,right? Wait,asecondletsgobacktowhywerebackingup: Backupsshouldpreventusfromlosinganydataorlosingany work,andensurethatwealwayshaveaccesstoourdatawith aslittledowntimeaspossible. Okay,thisstatementclearlyindicatesthatweneedtograbthedata,butthatlastphrase haveaccesstoourdatawithaslittledowntimeaspossibleaddssomethingimportant. Inordertoaccessourdata,weneedtheOSandassociatedapplicationstobeupand running!AdatabackupisuselesswithoutanapplicationandOStorestoreitto.Ivealready explainedwhyrebuildingaserverusingtheinstallationmediaissoslowyouhaveto performlengthyinstalls,theninstallservicepacksandpatches,andthenrestoreyourdata. Thistellsme,then,thatourbackupmustbeoftheentireserver.Afterall,Imnotjusthere toarchivemydataIalsoneedtobeabletorestoreitquickly,andgetaccesstoitquickly, andthatmeansIneedtorestoretheOSandanyapplicationsquickly.Soregardlessof practicalityfornowImgoingtosaythatbackinguptheentireserveristheonlywayto go.Ijustneedtofigureouthowtodoitquickly.

WhenDoYouBackUp?
HowoftenwillIbemakingbackups?UnderBackup1.0,thiswasarealquestion.Often,you mighttakeafullbackupduringaneveningorweekendmaintenancewindow,thengrab smallerbackupsmorefrequently.WhenIstartedoutinIT,IwasanAS/400operator. Everyevening,wemadetapebackupsofourmostimportantdatafilesfromtheAS/400;on weekends,weranafullbackupoftheentiresystem.Backingupthedatafilestookafew hours,andwehadtodoitintheeveningafterprettymuchalltheworkforthedaywas finishedbecausethedatawasunavailablewhilethebackupswererunning(infact,we prettymuchkickedeveryoneoffthesystemwhilebackupswerebeingdone).Theweekend fullbackupscouldtakeafullday,andeveryonehadtobeofflinethen. ButmaintenancewindowsareaBackup1.0concept,soletsdisregardthem.Infact,lets reviewourwholereasonforbeinghereonemoretime: Backupsshouldpreventusfromlosinganydataorlosingany work,andensurethatwealwayshaveaccesstoourdatawith aslittledowntimeaspossible.

10

Chapter 1 Rightthereismyanswer:fromlosinganydataorlosinganywork.Thattellsmethe Backup1.0methodofpointintimesnapshotsisuselessbecausenomatterhowoftenIm makingincrementalordifferentialbackups,Imstillgoingtobeatriskforlosingsomework ordata,andthatsnotacceptable. Soifyouask,Whenwillyoumakebackups?IhavetoanswerAlways.Literally continuousbackups.Infact,theindustryalreadyhasatermforit:continuousdata protection.Althoughspecifictechniquesvary,youcanthinkofthisveryroughlyas beingsimilartoRAID1drivemirroring.InaRAID1array,asFigure1.4shows,thedrive controllerwritesblocksofdatatotwo(ormore)harddrivesatonce.Disk2isacomplete, blocklevelbackupofDisk1.RestoringisfastsimplyswapthetwoifDisk1goesbellyup.

Figure1.4:RAID1diskmirroring. Ofcourse,RAID1isgoodforacertaintypeofscenariobutitisntpracticalforallsituations, anditdoesntmeetallourbackuprequirements.Forone,serverdisksarestillpretty expensive.Inaserverusingalargenumberofdisks,mirroringeveryoneofthemisnt practical.SomeorganizationswillsetupaRAID5arrayandthensetupasecondarrayto mirrorthefirstbutthatcanbeincrediblyexpensive.Afurtherproblemisthatthebackup diskscoexistwiththeprimarydisks,sothebackupdisksarestillatriskfordamagedueto fire,flood,andotherphysicalthreats.Further,amirrorisonlyabackupforthecurrent conditionoftheprimarydisk:Youcantrollbacktoapreviouspointintime.Somirroring aloneisagreattoolforcertainsituations,butitisntacompletebackupsolution.Whatitis, though,isagoodideaforhowtomakecontinuousbackups.Wejustneedtoleveragethe techniqueabitdifferently.

WhatTypeofBackupWillYouUse?
Fullbackup?Differential?Incremental?IhavetosaynoneofthesebecausethoseBackup 1.0termsareassociatedwithpointintimesnapshots,andwerenotgoingtousethose. Instead,weregoingtouseaBackup2.0technique,borrowingfromtheRAID1conceptof blocklevelmirroring.Partofcontinuousdataprotection,wellcallthisblocklevelbackups. Figure1.5showshowitmightwork.

11

Chapter 1

Figure1.5:Agentbasedblockbackups. Here,asoftwareagentofsomekindrunsontheserver.Asblocksarechangedondisk,this agenttransmitsthoseblockstoabackupserver,whichstoresthem.Thatservermight storeblocksformanydifferentservers.Theagentwouldlikelytapintoaverylowlevelof theOStoaccomplishthis.Thebenefits: Wecanhavenearlyrealtimebackupsofallchanges,astheyhappen Wegettheentireserver,notjustthedata Wecanstoremorethanjustthecurrentblocks;infact,wecanstorechangesasfar backaswewant,meaningwecanrestoreanygivenfilewhichconsistsofmultiple diskblockstoanypointintimewewant Wecanrestoretheentireserverbysimplywritingallthelatestbackedupblocksto aservereithertheoriginalserverorareplacement Intheeventofcorruptedblocks,wemightstillbebackingthoseupbutwevealso gotolder,noncorruptversionsofthosesameblocks,sowecanpotentiallyrepair filesthathavebecomecorruptedtotheirmostrecent,noncorruptedpointintime

Thisispowerfulmagic,butitsareality:Todaysmarketincludessolutionsthatfollowthis technique.ItdeliversBackup2.0:continuousbackupsthataredesignedforrestores,notfor archiving.

12

Chapter 1

WhereDoYouStoreBackups?
Doyouneedoffsitestorageofyourbackups?Probablyyes.In1996,ParisbasedCredit Lyonnaishadafireintheirheadquarters.Administratorsranintotheburningbuildingto rescuebackuptapesbecausenothingwasstoredoffsite.Letmewritethatagain:Ranintoa burningbuilding.Folks,fireisaconstantpossibility,asisthepossibilityofdamagefrom floods(badplumbinganyone?)andotherdisasters.Ifthedataisworthbackingup,its worthkeepingcopiessomewhereelse.Attheveryleast,havesomesortofonsitestorage thatsdisasterproofawaterprooffiresafe,forexample.Doesthatmeanyouhavetouse magnetictape?No,butyouprobablywill,simplybecauseitsrelativelyinexpensive,fairly durable,andeasytoworkwith.Youlllikelyendupusingtapeinconjunctionwith somethingelse,infact,withtapesbeingthesortoflastresortplacetorestorefrom.The pointisthis:Dontassumethatamajordisasterwillnotstrikeyou.Pastperformanceis noguaranteeoffutureresults;justbecauseyouveneverbeenhitbyadisasterbefore doesntmeanyouwontbehitbyoneeventually.Thatswhypeoplebuyinsurancepolicies, andbackupsarebasicallyaformofinsurance. IntermsofBackup2.0,wemightcombineourblockbasedbackupswithsometapebased storage.Ourbackupserver,forexample,mightperiodicallydumpallitsbackedupblocks toatapearray,allowingustocarryasnapshotoffsiteforarchivalpurposesandtoprotect againstatotaldisastertoourdatacenter.

ShouldYouTestBackups?
Thisisatrickquestion.Theansweris,Ofcourse.AsIvealreadyexplained,though,few folksactuallydo.Why?Well,therearereallyafewreasons,manyofwhicharerelatedto ourBackup1.0mindset. First,asImentionedearlier,isthetimecommitment.Spendinghoursdoingatestrestore isntinmostfolksbudgetsthesedays.Ofcourse,ablockbasedrestorecanactuallybe donemorequickly:Yourestreamingtherestorefromdisksoverahighspeednetwork,not readingthemeversoslowlyfromatapedrive. Second,therestheavailabilityofhardware.Now,ifyouretestingsingleitemrecovery, mostbackupsolutionswillallowyoutorestorefilestoanylocationyouwant,soyoujust needasmallspotonanexistingfileserver.Butyoushouldalsobetestingfullondisaster recovery,whereyourestoreaserverthatwascompletelylost(say,tofire)toadifferent pieceofhardware.TheproblemisthatmanyBackup1.0stylesolutionsrequireyouto restoretoidenticalhardware,meaningyouhavetohavealotofspareserversaround.Not gonnahappen.Agoodsolutionwillletyourestoretodissimilarhardware,whichisactually morepracticalfromadisasterrecoveryperspective;anidealsolutionwillletyourestoreto avirtualizedserver,whichisabsolutelyperfect.Soyes:Testyourbackups.Regularly. Performbothsingleitemrestoresandthetypeofbaremetalrestoreyoudassociatewitha totaldisaster,ideallyutilizingmodernvirtualizationtechnologiestoeliminateorreduce theneedforextratestrestorehardware.

13

Chapter 1 Virtualization:MorethanJustConsolidation AsIlldiscussinlaterchapters,virtualizationisanintegralpartoftheBackup 2.0mentality.InBackup1.0,afullsitedisastermightmeanretreatingtoa specialpurpose,leasedoffsiterecoveryfacilityandstartingalengthyrestore processusingyourmostrecentoffsitebackuptapes. InBackup2.0,thatfacilitymightliveontheInternetandconsistofoneor morevirtualizationhosts,eachrunningadozenorsovirtualservers.You streamyourlatestbackupsoverthewiretothevirtualservers,performinga barevirtualmetalrecoveryratherthanrecoveringtoactual,physical machines.Thisapproachmakesitmorepracticaltorecoverasetofservers, makesthatrecoveryfasterandcheaper(noleasedfacilities),andmakesit morepracticaltoconductoccasionaltestrunsofacompletedisaster scenario.

AreYouKeepinganEyeonYourBackups?
Doyoumonitoryourbackups?Otherthanjustcheckinganerrorlog,Imean?Youshould. Infact,checkingerrorlogsasidefrombeingincrediblyboringisthekindofoldschool Backup1.0mentalityImtryingtochangeinthisbook.Amodern,Backup2.0stylesolution shouldalertyoutoproblems,andideallymightevenintegratewithanexistingmonitoring solution,suchasMicrosoftsSystemCenterEssentialsorSystemCenterOperations Manager. Whatmightthosealertsactuallyinformyouof?Primarily,problemswiththebackups themselves,suchascorruption.Nothingsworsethansuddenlyfindingyouneedyour backupsandthenrealizingthattheyrenogoodduetocorruption;youshouldbeinformed ofcorruptionassoonasitoccurs.AgoodBackup2.0stylesolutionmightinformyouvia email,mightdropsomethinginaWindowseventlog(whichSystemCenterOperations Managercouldthenpickupandraisetoyourattention),orperformsomesimilarstyleof notification. Figure1.6showshowSystemCenterOperationsManagercanbeusedtoconfigureanalert foragiventypeofeventlogentrysuchasaneventlogentrycreatedbyyourbackup solution,alertingyoutocorruption.NotethatSystemCenterEssentialsworkssimilarlyfor thistypeofalert.

14

Chapter 1

Figure1.6:CreatinganeventlogentryalertinSCOM. AreallywithitbackupsolutionmightevencomecompletewithaSystemCenter ManagementPack.AManagementPackisbasicallyapreconfiguredsetofrulesfor monitoringandalertingonaspecificapplication;thepacktellsSystemCenterOperations Managerwhattolookfor(suchasspecificeventlogIDs)andwhattodo(suchassending emailalerts).ButifyourbackupsolutiondoesntcomewithaManagementPack,atleast makesurethatithasitsownbuiltinfeaturesforprovidingthesetypesofnotifications.

15

Chapter 1

ApproachestoBackingUp
Havingadvocatedforblocklevelbackups,Iwanttotakeastepbackandbrieflyreviewthe entiregamutofbackuppossibilities.Althoughsomeofthesedontmeetmyrequirements foragoodbackupandrecoverysystem,theynonethelessoffersomebusinessvaluethat youshouldbeawareof.

FileBasedBackups
Filebasedbackupsaretheoldesttypeofbackup,andprobablystillthemostcommon.It involvessimplytakingasnapshotapointintimecopyofoneormorefiles.Thesetypes ofbackupsmayhavedifficultyworkingwithopenfiles,andtheydontcaptureeverychange madetoafiletheyjustgrabacopyofitataspecifictime. Buttheresvaluehere.Forexample,WindowsbuiltinVolumeShadowCopyfeatureis essentiallyanonserverfilebasedbackup,grabbingcopiesoffilesasuserschangethem andstoringtheminalocalcacheontheserver.Userscanaccessthesecachedfieversions ontheirown,usingWindowsExplorersPreviousVersionsfeature,asFigure1.7shows.

Figure1.7:Accessingpreviousversions. 16

Chapter 1 Thekeyphrasehereisontheirown.Unlikemanydatacenterclassbackupsolutions, VolumeShadowCopy/PreviousVersionsisdesignedforuserselfservice.Properlyused (meaningyouruserswillneedabitoftraining),thisfeaturecanhelppreventcallstothe Helpdeskandoverheadforyouwhenusersneedtorollbackafiletoasomewhatolder version.Infact,Iveseenthisfeatureagain,withabitofendusertrainingreduce singlefilerecoveryHelpdeskcallsby90%inseveralofmyclients.Thoseorganizationstell methattheaveragecostforcompletingafilerecoveryrequestisabout$75,andtheones thatkeepreallygoodrecordsaverageaboutfourcallsaweek.Thatsasavingsofmorethan $15,000allforfree,sincethefeatureisbuiltintoWindows(well,youdohavetospenda bitextraforthediskspaceneededtostorethecache). InaBackup2.0world,thereshouldberoomforcomplementarysolutions.Previous Versionsmeetsaspecificneed:userselfserviceforindividualfilerollback.Whateverdata centerbackupsolutionyouselectshouldntinterferewithcomplementarysolutions,andin fact,shouldembracethem.WherefilebasedbackupstendtofallshortasIve discussedisinthewholeserverbackupscenario,whichyoudbeperforminginthedata center.

ImageBackups
ImagebackupisanothertermforwhatIvebeencallingblockbasedbackups.Thereare reallytwowaystoachieveanimagestylebackup:byusingsolutionssuchasthetriedand trueGhostsoftwareandviawhatIllcallstreamingimages. SoftwaresuchasGhostanditsmanycompetitorsmakepointintimesnapshotsofadisk, typicallycompressingthediskblockssothattheresultingimagefileismuchsmaller.This softwareisntusuallypositionedasabackupandrecoverysolutionbutratherasa deploymentsolution:Youmakeatemplatecomputerthemanualway,imageit,andthen deploythatimageratherthaninstallingothercomputersmanually.Itsmostcommonly usedfordesktopdeployment,anditcanserveasakindoflastditchrecoverytoolfor desktops,essentiallyredeployingtheimagetogetamachinebacktosquareone.Butasa pointintimesnapshot,itsnotusefulforcapturingdata,changestoapplications,andso forth. Anotherweakspotisthatsnapshotimagingsoftwareusuallyrequiresthesourcecomputer tobeunavailable.Typically,theimageiscapturedusingaprebootenvironment(likethe oneshowninFigure1.8)asortofstrippeddownOSthatrunsinlieuofWindows.This ensuresthatnoneofthefilesondiskareopenandchangingsothatasingle,consistent snapshotcanbegained.Youcanseewherethiswouldbeabitburdensomeasacontinual backuptechnique.

17

Chapter 1

Figure1.8:Ghostsprebootenvironment. StreamingimagesarethekindofblockbasedbackupIillustratedinFigure1.5,earlierin thischapter.Thistechniqueisthebasisforalmostrealtime,continuousdataprotectionof multipleservers.Youcouldusethetechniquewithdesktopcomputers,too,althoughI suspectdoingsowouldntbepracticalitwouldinvolvealotofbackupdataflyingaround yournetwork,nottomentionalotofstorage.No,Ithinkthistechniqueisreallygeared bestforthedatacenter,whereyourebackingupserversandwhereyoucaneasilysetup highspeedorevendedicatednetworkconnectionsbetweenthoseservers.

ApplicationSpecificIdeas
Someapplicationsprimarilymissioncritical,alwaysonapplicationssuchasMicrosoft SQLServerandExchangeServerpresenttheirownchallengesforbackupandrecovery. Theseapplicationsexecutablesarealwaysrunning,andtheyalwayshaveseveraldatafiles open,makingitdifficultforfilelevelbackupsoftwaretogetaconsistentsnapshot.

18

Chapter 1 Tohelpaddressthis,theapplicationsdesignerstakevaryingapproaches.SQLServer,for example,hasitsowninternalbackupandrecoverycapability,whichistiedtotheproducts ownuniquearchitecture.Traditionally,thebestwaytogetaSQLServerbackupistoask SQLServertodoit.Youmight,forexample,useSQLServersowntoolstoproduceabackup file,thengrabthatfilewithatraditionalfilebasedbackupsolution.Or,youmightcreatean agentthattapsintoSQLServerandgetsthedatathatwaytheapproachusedbymost enterpriselevel,Backup1.0stylebackupsolutions.Figure1.9showsacommondialogbox forabackupsolutionsconfiguration,showingthataSQLServerspecificagentisloaded andabletostreamdatafromSQLServertothebackupsoftware.ExchangeServer functionalitymightworksimilarlyinfact,youcanseethattabinthefigureaswell.

Figure1.9:Applicationspecificbackupagents. ExchangeServersdeveloperstookaslightlydifferentapproach,choosingtointegratewith WindowsVolumeShadowCopyservice.Essentially,theyprovideacopyoftheExchange datafilesthroughVolumeShadowCopy;abackupsolutionsimplyneedstoaccessthe VolumeShadowCopyApplicationProgrammingInterfaces(APIs)andrequestthelatest copyofthedatabase.Again,itsExchangeServerthatsdoingmostofthework,buta dedicatedagentofsomekindisusuallyneededtogettotherightAPIs.AsFigure1.10 shows,evenWindowsServer2008sbuiltinbackupcanbeextendedtoseetheExchange Serverdatabases. 19

Chapter 1

Figure1.10:BackingupExchangeServerinWindowsServerBackup. ThedownsideisthattheseapplicationspecificapproachesarestillBackup1.0innature, meaningtheyregrabbingasnapshot.Yourestillatriskforlosingdataandworkthat occursbetweensnapshots;particularlywiththesemissioncriticalapplications,Ithink thatsjustunacceptable. Blocklevelbackupscancertainlysolvetheproblembecausetheyregrabbingchangesat thedisklevelanddontparticularlyneedtounderstandwhatthosediskblocksarefor.A diskblockthatspartofafilelooksthesameasonethatspartofaSQLServerdatabase,so thebackupsolutionjustgrabsemall.Butfromarecoveryviewpoint,yourbackupsolution doesneedsomeadditionalsmarts.Hereswhy:Asimplefilesay,aWorddocument consistsofseveralblocksofdiskspace.Itseasytokeeptrackofwhichblocksmakeupany givenfile,andnodiskblockwilleversharedatafromtwofiles.Ifyouneedtorestore Salaries.xls,youfigureoutwhichblocksthatfileliveson,andrestorejustthose.Easy.

20

Chapter 1 WithcomplexdatastoressuchasSQLServerandExchangeServerthingsarentsoeasy. Asinglemailmessagemightoccupymultipleblocksofdiskspace,butthosesameblocks mightalsocontaindatarelatedtoothermessages.Thedatabasealsohasinternalpointers andindexesthatneedtoberestoredinorderforagivenmessagetobeaccessible.Soa blockbasedbackupdoesntneedmuchinthewayofextrasmartstomakeabackup,butit willneedsomeclevernessinordertorestoresingleitemsfromthatbackup.Solution vendorstendtoapproachthisbyusingplugins:Itseasytothinkoftheseasbeingsimilar totheBackup1.0styleagents,buttheyrenot.Thesepluginsdontnecessarilyassistwith thebackupprocess(althoughtheymayrecordspecialinformationtoassistwith recoveries),buttheydocontainthesmartsnecessarytopeerinsidecomplexdatastores torecoversingleitems.

OurBackup2.0WishList
ThefollowinglisthighlightsdesirablecapabilitiesinaBackup2.0stylebackupsolution: Continuousdataprotectionthatsalwayson,alwaysworking,andasclosetoreal timeasispractical Theabilitytomovesnapshotsofmybackupstotape(orotherportablemedia)for offsitestorage Theabilitytorestoreanythingfromasinglefiletoanentireserverquickly,andto differenthardware(orvirtualhardware)ifneeded Blocklevelimagingthatprovidestheabilitytorollbacktoanypointintimeand keepsbackupsphysicallyseparatefromthesource Automaticnotificationsofproblemssuchascorruptionwiththebackups DoesntinterferewithcomplementarysolutionssuchasWindowsownVolume ShadowCopyfeature Theabilitytoeasilytestrestores,fromasinglefiletoacompletedisaster,ideally usingdissimilarhardwareorvirtualization TheabilitytorestoresingleitemsfromcomplexstoreslikeSQLServerorExchange Server

Illaddafewthingstothislistasweprogressthroughtheupcomingchapter,butthisisa goodstart.ItrepresentseverythingthattheBackup2.0philosophyisallabout,andit meetsalltheimpliedrequirementsinourbusinesslevelstatement: Backupsshouldpreventusfromlosinganydataorlosingany work,andensurethatwealwayshaveaccesstoourdatawith aslittledowntimeaspossible.

21

Chapter 1

WhatsAhead
Ivegotafullplatecomingupforyou,startingwiththenextchapterinthisbook,whereI gettosharesomeofthehorrorstoriesIverunacrosswithmyconsultingclients,inthe news,andsoforth.Itskindofinterestingtoseetheproblemsothershavehad,butitcanbe instructional,too:Illexamineeachcaseanddrawconclusionsaboutwhatwentwrongand whatyouwouldneedtodotoavoidthatsituation. Chapter3iswhereIlldiveintotheactualtechnologyofwholeserverbackups.Thisisan areawhereIthinkBackup2.0reallyhassomeimmediatebenefit,butIllstartby examiningmoretraditionalwholeserverbackuptechniquesandidentifyingthingsthat dontalwaysworksowell.Ifyoureresponsibleforbackingupdomaincontrollers, infrastructureservers,Webservers,apublickeyinfrastructure,orsimilarservers,then thisisthechapterforyou. InChapter4,IlltacklethetoughtopicofExchangeServerbackupstoughenoughthatthe backupsoftwarethatshippedwithWindowsServer2008couldntevendoit.Again,Illlay outsomeofthemoretraditionalwaysthatExchangebackupshavebeenmade,andthen rethinktheprocessandcomeupwithawishlistofbackupcapabilitiesthatincludeseveral Exchangespecificconcerns.Chapter5willfollowthesameapproachforSQLServer,and Chapter6willexamineSharePointinthesameway. Chapter7willbeabitofadeparture,asIllfocusonvirtualizationserverbackups.Thisis stillarelativelynewfield,andIlllookatwaysinwhichtraditionalbackuptechniquesare beingusedandexaminehowwelltheyreactuallygettingthejobdone.Illcoversomeof theuniqueaspectsofvirtualizationbackupsandexamineinnovativetechniquesthat Backup2.0canbringtothetable. InChapter8,Illpullbackabitforabroadlookatotherbackupconcernsandcapabilities: Baremetalrecovery,dataretentionconcerns,complianceandsecurityissues,mobile infrastructureproblems,andsoon.Illalsolookatinstanceswhereoldschoolbackups mightstillprovidesomevalue,andIllofferadviceforintegratingBackup2.0withmore traditionaltechniques. Allofthebackupsweremakingaregoingtorequiresomeseriousstorage,soIlluse Chapter9tofocusonstoragearchitecture.Illlookathowbackupdataisstructured,and comparetheadvantagesanddisadvantagesofthingslikestorageareanetworks(SANs), tapedrives,localstorage,andsoforth,andexaminepressingissuesofstorage: compression,encryption,security,deduplication,andsoon.Illalsolookatuniqueways thatBackup2.0allowsyoutointeractwithyourbackedupdatamoreeasilyandefficiently.

22

Chapter 1 Chapter10willfocusondisasterrecoveryandImeanrealdisasters.Illlookatthingslike baremetalrecovery,andIllcoversomeofthemoreinterestingcapabilitiesthattodays technologiesoffer,suchasusingvirtualizationratherthandedicatedoffsitefacilitiesas partofadisasterrecoveryplan. Chapter11isforallthebusinessmindedreadersoutthere;thischapteriswhereIll discussthecostsinvolvedinrearchitectingbackupandrecoverytouseBackup2.0 techniques.Naturally,Illalsohelpyoudeterminewhetherdoingsoisactuallyworthitto yourorganization,andeventacklesomeofthenontechnicalwhatIliketocall politicalissuesthatyoumayhavetosolveinordertomakeyourbackupsituationmore modernandefficient. Finally,Chapter12willbethechanceformetosharestoriesfrommyownexperiences withBackup2.0asortoftalesfromthetrencheschapter,withcasestudiesthat describesuccesses(andchallenges)IveseenwithBackup2.0. Wehavealongjourneyaheadofus,butyouvemadeagoodstart.Ilookforwardtoseeing youagaininthenextchapter.

23

S-ar putea să vă placă și