Sie sind auf Seite 1von 3

25th March 2013

SAP HANA Backup Notes

SA P HA N A i s an i n -m em ory database or a database th at stores i ts database tabl es i n RA M. RA M i s th e fastest possi bl e data storage m edi a
av ai l abl e today bu t i t i s v ol ati l e. Th i s m ean s th at wh en th e RA M ch i ps l ose power, th e data bi ts on th e ch i p are erased or l ost. To av oi d data
l oss, SA P HA N A i n corporates regu l ar sav e poi n ts u si n g two persi sten t storage volumes Th e fi rst i s th e database l oggi n g or redo l og
m ou n t. Most SA P HA N A h ardware v en dors wi l l pl ace th i s fi l e sy stem on a Fu si on -IO SLC or MLC n an d fl ash card or u se a RA ID 10
con trol l er wi th an array wi th SSD di sks to accom m odate th i s m ou n t. Wh en y ou wri te data to SA P HA N A , i t i s wri tten to th e l ogs fi rst th en
m ov ed i n to RA M. Th e l og m ou n t sh ou l d accom m odate 100,000+ IOPS. Th e secon d m ou n t poi n t i s th e persi sten t data storage m ou n t poi n t.
Th i s i s ty pi cal l y m ou n ted on a stan dard m agn eti c di sk array an d i t i s u sed to store a copy of al l com m i tted data th at i s stored i n -m em ory .
Wi th th e com bi n ati on of both redo l oggi n g an d i n -m em ory data sav e poi n ts, th e SA P HA N A sy stem i s fu l l y capabl e of recov eri n g from a
su dden power fai l u re. Howev er, wh at h appen s wh en y ou l ose th e l oggi n g or persi sten t data storage m ou n ts? Better y et, wh at h appen s
wh en m y SA P HA N A serv er i s n o l on ger u sabl e? To ov ercom e th ese poten ti al probl em s, regu l ar backu ps of th e SA P HA N A sy stem are
requ i red. Th i s arti cl e wi l l wal k y ou th rou gh th e process of backi n g u p th e SA P HA N A database an d h el p y ou i den ti fy th e com pon en ts th at
are cri ti cal to th e processes.

Question: What are the key backup components of the SAP HANA system?
T he data and metadata
When performing a backup of the SAP HANA system the tables, views, undo logs, packages, information
views and metadata are all saved to a configurable persistent disk location. In short, all of the data and code
that is stored in SAP HANA will be backed up to a path that you specify.
The default location of the data backup is configured as $(DIR_INSTANCE)/backup/data. Backups can be
triggered using the SAP HANA studio, the DBA Cockpit in BW, SQL script commands or 3rd party tools.
They are not automatically run by the SAP HANA system. Each HANA DBA will have to devise a backup
strategy with the hardware vendor before purchasing SAP HANA to insure that they have
the appropriated hardware to support the backup process.
To initiate a backup using SQL scripts run the following from the SAP HANA Studio SQL window.
BACKUP DATA USING FILE (COMPLETE_DATA_BACKUP)
To initiate a backup using the hdbsql command line, run the following command using the SAP HANA client
that is installed on your SAP HANA Linux server.
./hdbsql -i 0 -n localhost -u backup_user -p xxxx BACKUP DATA USING FILE
(COMPLETE_DATA_BACKUP)
To initiate the backup using SAP HANA studio, right click your system in the navigation window and choose
the backup option.

[http://jdh2n.files.wordpress.com/2013/03/sap_hana_studio_backup.gif]

For more information see the SAP HANA Technical Operations


Manualhttp://help.sap.com/hana/hana_tom_en.pdf [http://help.sap.com/hana/hana_tom_en.pdf]
T he logs
By default, the SAP HANA system will create log file backup every 15 minutes (900 seconds) or when the
standard log segments become full. They are also backed up when the SAP HANA system starts. These log
backups can be used during the SAP HANA recovery processes to role the logs forward or backwards to a
specific point in time. Each time the log backup job runs, a log segment snapshot or series of files are created
in the $(DIR_INSTANCE)/backup/log directory. During the log file backup processes, new files are created
each time the job runs. The existing files are not automatically deleted or overwritten. In short, the files will
grow indefinitely until they are deleted by the SAP HANA DBA. This backup is independent of the standard
full system data backup mentioned in the data and metadata backup sections.
As mentioned above, the SAP HANA DBA will need to maintain this log file backup location either manually
or using a script. If you need to maintain roll backs for several months, I would recommend that you retain
several months of files. If you feel that your full system backup will be sufficient, I would only keep a few
days of these files.
The following is an example script that you can run on the SAP HANA host to delete any log backups that
are older than 5 days. Never delete your persistent change logs or database files directories.
Make sure you only delete the log backups and that you have the path correct before
deleting any files.
find /usr/sap/../../backup/log/* -mtime +5 -exec rm {} \;

T he configuration and backup catalog files

The SAP HANA configuration files are not included in the standard full system backup nor the automated
log file backups. You need to backup these files using a script or 3rd party backup tool.
The configuration files contain any custom SAP HANA parameters or settings that will be needed if a full
rebuild of the database is required. In addition there is a backup catalog file that needs to be
retained because it contains information that is needed for the point-in-time restore processes. The backup
catalog is not required for a full system restore but it should be backed-up with each full system backup.
Configuration File Locations
/usr/sap/../../SYS/global/hdb/custom/config/*
Backup Catalog File Locations
/usr/sap/../../SYS/global/hdb/metadata/*
Where should I store m y backup files?

While the SAP HANA system will store the backups on the local file system by default, it is best that you
store these files on a different file system entirely. This file system can be mounted to the SAP HANA
operating system but should be separate from the standard logging and persistent storage volumes. In
addition it would be wise to copy this mount to a disaster recover location, tape system or other backup
media to ensure the redundancy and availability of the backup files. In short, make sure that you have a plan
to manage both the standard full system backup files and the automatic log file backups.
SAP Notes:
Scheduling the SAP HANA Backups: 1651055 [https://service.sap.com/sap/support/notes/1651055]
SAP HANA database backup and recovery: 1642148 [https://service.sap.com/sap/support/notes/1642148]
Posted 25th March 2013 by Hari Prakash Nandoori
1

View comments

kalyan k 14 February 2014 02:14


Thanks for sharing your Info..it's very useful .we also provides the Best SAP HANA Online Training
Reply

Enter your comment...

Comment as:

Publish

Google Account

Preview

Das könnte Ihnen auch gefallen