Você está na página 1de 14

9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

GettingStarted Store

CommunityWIKI SAPCommunity Welcome,Guest Login Register


SAPHANA / SAPHANAandInMemoryComputing

SAPHANABackupandRecovery
CreatedbyPaulPower,lastmodifiedonMay30,2016

Purpose
SystemPrivileges
HowtoPerformaBackup
ManualBackupCheck
Recovery
CommonQuestions
IssuesandReportedProblems
RelatedDocuments
RelatedVideos:
RelatedSAPNotes/KBAs

Purpose
Thispageistoexplainthestepsonhowtoperformabasicbackupandrecovery.Attheendofthisguide,therewillbefrequentlyaskedquestionsandcommonproblemsthatareencountered.Foranin
depthexplanationofthebackupandrecoveryprocess,pleaseseetheAdminguidehttp://help.sap.com/hana/SAP_HANA_Administration_Guide_en.pdf.

SystemPrivileges
Inordertodoabackup,theuserwillneedthefollowingprivileges

1.BACKUPADMINorBACKUPOPERATOR
2.CATALOGREAD

HowtoPerformaBackup
YoucanperformafulldatabackupthroughHANAStudioandalsothroughSQLStatements.

Studio
OpenSAPHANAStudioandonthenavigatorside(lefthandside)expandyoursystemanddoubleclicktheBackupicon

Pressthe"Backup"button.
**Foramultitenantdatabase,youwillhavetheoptiontobackupthesystemdatabaseandthetenantdatabase.**

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 1/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Thefollowingpopupwillappear.

ClickNext

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 2/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Thebackupwillthenshowyouthebackupstatusandthenfinish.

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 3/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Thebackupwillfinishwiththesummarypage.

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 4/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

SQLCommandforBackups
TheSQLCommandtoperformafulldatabackupfollowsthesyntax:

BACKUPDATAUSINGFILE('<nameofbackup>')

ManualBackupCheck
Althoughautomaticcheckstakeplacewhilecompletedatabackupsandlogbackupsareperformed,youshouldmanuallyrechecktheintegrityofanybackupifitiscopiedormovedtoanotherlocation.

hdbbackupcheckv<Backupfile>

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 5/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Recovery
TorecoveraSAPHANAdatabase,thedatabaseneedstobeshutdown.Duringrecovery,thedatabasethereforecannotbeaccessedbyendusersorapplications.

ItmaybenecessarytorecovertheSAPHANAdatabaseinthefollowingsituations:

Adiskinthedataareaisunusable.
Adiskinthelogareaisunusable.
Asaconsequenceofalogicalerror,thedatabaseneedstoberesettoitsstateataparticularpointintime.
Youwanttocreateacopyofthedatabase.

Thereareafewdifferenttypesofrecovery

MostRecentState:Usedforrecoveringthedatabasetothetimeascloseaspossibletothecurrenttime.Forthisrecoverythedatabackupandlogbackuphavetobeavailablesincelastdatabackup
andlogareaarerequiredtoperformtheabovetyperecovery

PointinTime:Usedforrecoveringthedatabasetothespecificpointintime.Forthisrecoverythedatabackupandlogbackuphavetobeavailablesincelastdatabackupandlogareaarerequiredto
performtheabovetyperecovery

SpecificDataBackup:Usedforrecoveringthedatabasetoaspecifieddatabackup.Specificdatabackupisrequiredfortheabovetypeofrecoveryoption.

SpecificLogPosition:Thisrecoverytypeisanadvancedoptionthatcanbeusedinexceptionalcaseswhereapreviousrecoveryfailed.

RestrictionsforRecovery
ASAPHANAdatabasecannotberecoveredtoaSAPHANAdatabasewithalowersoftwareversion.TheSAPHANAdatabasesoftwareversionusedfortherecoverymustalwaysbethesameversion
orhigherthantheSAPHANAdatabaseusedtocreatethebackup.
Therecanbeanynumberofhostsinthetargetsystem,providedthatthenumberandtypeofservicesisidenticalinboththesourceandthetargetsystem.
WithSAPHANAmultitenantdatabasecontainers,recoveryusingsnapshotsisnotsupportedyet.Tenantdatabasescanberecoverdviatherelevantsystemdatabaseonly.

RecoveryProcess
ThedatabasecanberecoveredfromHANAStudioandalsofromSQLCommands.

Studio

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 6/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki
RightclickontheHANAsystemandthenselect"BackupandRecovery",then"Recovery"

TheHANAsystemwillstopandthentherecoverywizardwillappear.Fromhere,selecttherecoveryoption.Inthisexample,Ichosetorecoverfrom2hoursago.

Ensurethatthelogbackupdirectoryiscorrect.**ThisisimportantifyouarerecoveringontoadifferentHANAinstance**

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 7/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Thelocationofthedatabackupisspecifiednext

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 8/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

AdditionalSettings.

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 9/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

ConfirmallofthesettingsarecorrectandthenselectFinish.

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 10/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Therecoverywilltakesometime.AfterHANAhasperformedtherecovery,thefollowingscreenisdisplayed.TheHANAsystemwillstartautomaticallyafterasuccessfulrecovery.

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 11/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

CommandLine
ThePythonscriptrecoverSys.pysuppliestherestorecommandtotheservicesandstartsthedatabase.

ie)python/usr/sap/<SID>/SYS/exe/hdb/python_support/recoverSys.pypassword=<sidadmpasswd>waitcommand="RECOVERDATABASEUNTILTIMESTAMP'2013032923:59:59'"

1.Restoreuntilmostrecentstatechooseacurrenttimestamporoneinthefuture

RECOVERDATABASEUNTILTIMESTAMP'YYYYMMDDHH:MM:SS'

Ex:RECOVERDATABASEUNTILTIMESTAMP'2013032215:00:00'

2.RestoreuntilPointintime

RECOVERDATABASEUNTILTIMESTAMP'YYYYMMDDHH:MM:SS'

Restoreuntilpointintimewithtimestampusingfurtherdirectoriescontaininglogbackups

RECOVERDATABASEUNTILTIMESTAMP'YYYYMMDDHH:MM:SS'CHANGEALLLOGUSINGPATH('/usr/sap/SH1/HDB00/backup/logs1/,'/usr/sap/SH1/HDB00/backup/logs2/')

Ex:RECOVERDATABASEUNTILTIMESTAMP'2013030115:00:00'USINGDATAPATH('/usr/sap/SH1/HDB00/backup/data/COMPLETE')USINGLOGPATH
('/usr/sap/SH1/HDB00/backup/logs1/,'/usr/sap/SH1/HDB00/backup/logs2/')

CommonQuestions

Thefollowingareproblemshavebeenencounteredbycustomersinthepast.

Q:CanbackupsberecoveredtoaSAPHANAdatabasewithahighersoftwareversion?

A:ThisisansweredinSAPNote1642148FAQ:SAPHANADatabaseBackup&Recovery

"

Yes.

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 12/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki
YoucanrecoverdataandlogbackupscreatedwithaSAPHANAdatabasesoftwareversionlowerorequaltothetargetdatabase.DataandlogbackupscannotberecoveredtoaSAPHANAdatabase
withalowersoftwareversion.

IfyouareupdatingyourSAPHANAdatabasefromamaintenancerevisiontoasupportpackage,certainrestrictionsapply.

Moreinformation:SAPNote1948334(SAPHANADatabaseUpdatePathsforMaintenanceRevisions)

"

Q:Iamrecoveringusingabackupfromamultinodetoasinglenodeenvironment,whatshouldIcheckbeforeperformingthisrecovery?

A:Themostcommonproblemwithrecoveryfromadifferentsystemisamismatchintopology.Forexample,thebackupwastakenfromasystemthathas2indexserversandyouwanttorecoveritona
systemthathasonly1indexserver.Ifyouattempttodothis,therecoverwillfailandyouwillneedtorecoverbacktotheoriginalstate.

ThemostcommonservicethatismismatchingistheEmbeddedstatisticsserver.Tocheckthis,comparethenameserver.iniinthesourceandthetargetfor[statisticsserver]>active=true.
Thesecondmostcommonservicethatismismatchingistheindexserver.ConsultSAPNote2093572SAPHANAMigrationfromMultiNodetoSingleNodeformoredetailsonhowtoconfigurethetarget
systemtomatchthebackuplandscape.

Q:Ifarecoveryfails,myHANAserverdoesnotstart.

A:ThisisatypicalbehaviorofHANA.Youmustrecoverfromaworkingbackup(thathasthesametopology)

Q:Howdoyouperformasystemrefresh?

A:FollowthisnotetoperformasystemrefreshusingSWPM.PleaseseeSAPNote1844468HomogenoussystemcopyonSAPHANA

Q:I'mperformingarecoveryfromSPS09,isthereanythingIneedtobeawareof?

A:IfyouhaveupgradedtoSPS09,youshouldensurethatyouperformafulldatabackuppriortoattemptingarecovery.SeeSAPNote2119628Missingorwrongdataafterrecoveryofolderbackupwith
SAPHANASPS09..Afteryouhavesuccessfullyrecoveredagain,performanotherfulldatabackup.SeeSAPNote2097985PointinTimeRecoveryFailsAfterDataRestore.

Q:Ifthereisafailedbackup,whatdoIdofirst?

A:Consultthebackup.logformoredetailsontheerror.Thisisoneofthefirstthingstodo.Onceyoudeterminetheerror,youcansearchSAPKBA'sforasolution.

Q:Whatistheprocessofarchivingsystembasedbackups?

A:RefertoSAPNote1817703ArchivingfilesystembasedbackupsandSAPNote2096851ManagementofOldBackupsinHANA,todetermineifbackupfilescanbearchived.

Q:WewanttoupgradeourBackintsystem,whatneedstobedoneonHANA?

A:RefertoSAPNote2009486DisableSAPHANAlogbackupsduringupgradeofthirdpartybackuptoolthatsupportstheBackintforSAPHANAinterface

Q.WhencopyingorrefreshingoneSAPHANAsystemfromabackuptakenfromanotherSAPHANAsystem,cantheschemanamebechanged?

A.ItisnotpossibletochangetheschemanameontheSAPHANAdatabase.PleaseseeSAPNote1642148FAQ:SAPHANADatabaseBackup&Recovery

Q:Mybackupsareperformingslow,whatcanIdo?
A:SAPNote1835075Analyzebackupandrecoveryperformanceissues,providesdetailedstepsonhowtoanalyzeperformanceinrelationtobackupsandrecovery.

Q:Howdoyoucancelarunningbackup?
A:Tocancelarunningbackup,pleaseusethefollowing3SQLstatements:

1.Getthebackup_idofyourrunningbackup:
selectBACKUP_IDfrom"SYS"."M_BACKUP_CATALOG"whereentry_type_name='completedatabackup'andstate_name='running'orderbysys_start_timedesc
2.Cancelthebackup
backupcancel<backup_id>
3.Confirmthebackuphascancelled
selectstate_namefrom"SYS"."M_BACKUP_CATALOG"wherebackup_id=<backup_id>
4.Checktomakesuretherearenorunningbackupsstill
select*from"SYS"."M_BACKUP_CATALOG"whereSTATE_NAME='running'
5.Ifthebackupstillexists,youcantrytocancelthethreadthroughthecommands:
ALTERSYSTEMCANCELSESSION
ALTERSYSTEMDISCONNECTSESSION

Q:HowdoIdeterminewhatredologfilesareneededformyrestore?
A:Followthestepsinthisnote:1705945Determiningrequiredrestorationfiles

Q:CanIuseabackuptakenwith3rdpartytools(backint)toperformasystemcopy?

A:Yes,pleasefollowthestepsoftheadminguideat

http://help.sap.com/saphelp_hanaplatform/helpdata/en/ea/5004bdab024061afd1caae7d309263/content.htm

Q:Howdoyouenablefurthertracingifabackupisfailing?
A:Runthefollowingcommandinsqleditor:

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 13/14
9/30/2016 SAPHANABackupandRecoverySAPHANASCNWiki

Enablethetrace ALTERSYSTEMALTERCONFIGURATION('global.ini','SYSTEM')SET('backup','trace')='debug'withreconfigure

Disablethetrace ALTERSYSTEMALTERCONFIGURATION('global.ini','SYSTEM')UNSET('backup','trace')withreconfigure

IssuesandReportedProblems

Error:ThiserroroccurswhenItrytorecover"Couldnotrecoversystem<SID>Couldnotstartmasternameserver"?

Solution:WhenarecoveryisinitiatedinSAPHANAStudio,thedatabase,ifstillrunning,willbeshutdown.Thedatabaseisthenrestartedautomaticallyduringrecovery.Ifforsomereason,thedatabase
cannotbeshutdowncompletelybeforetherecovery,i.e.someserverprocessescannotbestopped,therestartandultimatelytherecoverywillfail.ConsultSAPNote1944052Recoveryfaileddueto
hdbdaemonprocessnotabletostop

RelatedDocuments

SCNDocumentSAPHANABackup/RecoveryOverview

SCNBlog:Backitonup..thenrecoverit

SCN:BackupandRecoveryHANA

SCN:SAPHANAAcademy:BackupandRecoveryBackupCatalog

RelatedVideos:
SAPHANAAcademyBackupandRecovery:StorageSnapshot[SPS08]

SAPHANAAcademyBackupandRecovery:BackupCatalog

RelatedSAPNotes/KBAs
SAPNote:1642148FAQ:SAPHANADatabaseBackup&Recovery

SAPNote:2093572SAPHANAMigrationfromMultiNodetoSingleNode

SAPNote:1651055SchedulingSAPHANADatabaseBackupsinLinux

SAPNote:2044438HANA:BackupfailsforOutOfMemoryerror

SAPNote:2122316mvccgarbagecollectionisblockedwhiledatabackupwhenauditingisenabled

SAPNote2123153HANARecoveryFailingwith"recoverystrategycouldnotbedetermined"

SAPNote1730932UsingbackuptoolswithBackintforHANA

SAPNote1730998Unrecommendedversionsofbackuptools

SAPNote2063454Longrunninglogbackups

Nolabels

ContactUs SAPHelpPortal
Privacy TermsofUse LegalDisclosure Copyright FollowSCN

https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Backup+and+Recovery 14/14

Você também pode gostar