Comprehensive data protection for all workloads
evander
Enthusiast
Posts: 67
Liked: 4 times
Joined: Nov 17, 2011 7:55 am
Contact:

SAP B1 HANA Support?

Post by evander » Jan 25, 2016 8:48 am

Hi - Does Veeam support SAP Business One HANA?

Busy rolling out new install on a SLES virtual machine in Vsphere environment as per SAP's guidelines, problem though is how to back up the box?

Thanks

P.Tide
Product Manager
Posts: 5179
Liked: 447 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: SAP B1 HANA Support?

Post by P.Tide » Jan 25, 2016 9:28 am

Hi,

Have you seen this document already? Also there is an option to run some pre-freeze/post-thaw scripts. Here is the copy of message that has been posted by our colleague Tom Sightler:
tsightler wrote:Here are some VERY crude scripts that create HANA snapshots via pre-freeze/post-thaw. I'm going to work on cleaning these up to automatically detect installed HANA instances and to use the HANA credential store instead of hard coded username/password. The snapshot process works quite well as it's fully possible to restore the data directory, either via FLR or, if data/logs are on separate volumes, with virtual disk restore (and of course full VM restore), and then use HANA Studio (or command line if you can figure it out) to perform point-in-time restores by applying the HANA automatic log backups. I probably need to document up the whole process. Perhaps I can work on that next week.

The testing was done with SuSE Enterprise for SAP Applicaitons 11 SP4, with SAP HANA SPS09 and a very basic install.

Pre-Freeze:

Code: Select all

#!/bin/bash
DATE=`date`
SQL="BACKUP DATA CREATE SNAPSHOT COMMENT '$DATE'"
/usr/sap/HDB/HDB00/exe/hdbsql -i 00 -u SYSTEM -p YourPassword -j $SQL
echo $DATE > /usr/sap/HDB00_snapshot.date
Post-Thaw:

Code: Select all

#!/bin/bash
DATE=`cat /usr/sap/HDB00_snapshot.date`
SQL="SELECT BACKUP_ID from M_BACKUP_CATALOG WHERE COMMENT = '$DATE'"
ID=`/usr/sap/HAN/HDB00/exe/hdbsql -i 00 -u SYSTEM -p YourPassword -a -j $SQL | head -n1`
SQL="BACKUP DATA CLOSE SNAPSHOT BACKUP_ID $ID SUCCESSFUL 'VeeamBackup'"
/usr/sap/HAN/HDB00/exe/hdbsql -i 00 -u SYSTEM -p YourPassword -a -j $SQL
rm /usr/sap/HDB00_snapshot.date
Thank you.

evander
Enthusiast
Posts: 67
Liked: 4 times
Joined: Nov 17, 2011 7:55 am
Contact:

Re: SAP B1 HANA Support?

Post by evander » Jan 25, 2016 2:51 pm

Hi Ptide - thanks for the response. Can you link me to the thread where Tom speaks about those scripts, I cant find it.

Am I correct in saying:
If I don't use any scripts but let Veeam backup the server I will still have crash consistent backups? I know this is not ideal but just trying to get to worse case scenarios here. The backups run after hours and there is nobody accessing the SAP server during this period so activity on the database should be little to none ( I think). If backups run at this time is it fairly safe to assume if the server needs to be restored I would be able to get to a point in time where the database was last backed up by Veeam with no corruption?

I don't know SAP at all at this stage, still learning, but I assume their management tool will have some form of backup utility that can backup the database to the local drive, at a minimum. If I can run that daily before the Veeam backup runs would it be safe to say I would have a solid option to recover from that last SAP/Veeam instance?

And lastly, is there any plans to include fully supported SAP HANA backup functionality within Veeam and even maybe Veeam Explorer for SAP in the Veeam roadmap? I suspect there may well be a good market for it out there with SAP being as popular around the world as it is.

thanks

P.Tide
Product Manager
Posts: 5179
Liked: 447 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: SAP B1 HANA Support?

Post by P.Tide » Jan 25, 2016 3:11 pm 1 person likes this post

Can you link me to the thread where Tom speaks about those scripts, I cant find it.
Sorry, it's on an internal forum. I've already copied all script-related info from that thread here, there is nothing more to add. If you want you can write a private message to Tom, maybe he will tell you more.
If I don't use any scripts but let Veeam backup the server I will still have crash consistent backups?
Correct.
The backups run after hours and there is nobody accessing the SAP server during this period so activity on the database should be little to none ( I think).
Then I suggest to to schedule an automated database service shutdown prior to doing a backup and automatic startup when the backup is done. On the other hand it also requires some scripts to be executed so it'd be better to use Tom's scripts.
If I can run that daily before the Veeam backup runs would it be safe to say I would have a solid option to recover from that last SAP/Veeam instance?
Yes. I'd also recommend you to keep your db backup copy somewhere away from your production server.
And lastly, is there any plans to include fully supported SAP HANA backup functionality within Veeam and even maybe Veeam Explorer for SAP in the Veeam roadmap? I suspect there may well be a good market for it out there with SAP being as popular around the world as it is.
Not yet. You can create a separate feature request thread for that so other users can vote for that feature.

Thank you.

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Jan 25, 2016 3:23 pm 4 people like this post

I'm continuing to work on those scripts to improve them as those original examples were just the first attempt and they have no error checking, are obviously hard coded with path names, and have a few minor issues such as not waiting for he snapshot to complete prior to returning, which can be crudely worked around with a sleep command. They were mainly intended for a POC to prove that it could be done and that the backups would be fully restorable using standard SAP process.

Using the scripts means that HANA is aware of the backups and they are properly recorded in the backup history table and you can see them in HANA Studio. Of course you may also need to handle log purge and other things as well. You can also leverage online logs to play the database forward from the time of the snapshot backup to a specific point-in-time.

Without the scripts HANA is unaware of the backups but indeed they are crash consistent and you should be able to restore the VM and/or database without serious issues, but there will be an extended recovery step during startup and, if you decide to go this route, I'd strongly suggest testing it well in you environment. I'm not sure of SAPs supports for "crash consistent" backups from a recovery perspective which is why I think the scripts are a better approach. They use HANAs documented "snapshot" method for backup, which was primarily designed for storage snapshots but works just as well for VM snapshots.

The more advanced scripts I'm working on parse the sapservices file to automatically discover installed instances and run the snapshot commands, waiting for them to complete prior to returning. I may also add some additional logic for handling logs although this could also be easily handled outside of the pre-freeze/post-thaw as well. I'm hoping to have these new scripts in a testable state by the end of this week. I'm currently doing basic testing in my lab today and tomorrow, but I have a lot of other things on the calendar this week so who knows how that might go. :) I'll post them here when I get them in a state worth sharing.

evander
Enthusiast
Posts: 67
Liked: 4 times
Joined: Nov 17, 2011 7:55 am
Contact:

Re: SAP B1 HANA Support?

Post by evander » Jan 26, 2016 11:31 am

Thanks to both of you, very helpful and I am definitely looking forward to the updated scripts you are working on Tom.
This is much appreciated.

FabioM
Veeam ProPartner
Posts: 36
Liked: 4 times
Joined: Sep 23, 2013 10:27 am
Full Name: Fábio Mendonça
Contact:

Re: SAP B1 HANA Support?

Post by FabioM » Feb 08, 2016 5:49 pm

Hi,
Is this valid for the Replication also?
Thanks

P.Tide
Product Manager
Posts: 5179
Liked: 447 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: SAP B1 HANA Support?

Post by P.Tide » Feb 08, 2016 6:45 pm

Hi,

Yes, scripts should work for a replication job as well. In case you have a long replica sync interval then I suggest you to take a look at replica from backup feature.

Thank you.

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Feb 08, 2016 6:51 pm 4 people like this post

Yes, it is valid for replication as well. Note that when you fail over the replica VM and the HANA services start they will automatically see the snapshot, perform a recovery and the snapshot will be tagged as "abandoned due to service restart". This is expected behavior and is the same behavior seen during full VM restores as well. No user interaction is required.

I've continued work on these scripts and they've grown significantly more sophisticated. Below I will post the URL to the current versions. This version has a few variables for username, password, SAP path (path to sapservices file) and timeout (default 5 minutes). The scripts now automatically parse the sapservices file to find installed instances, place each in snapshot mode, wait and check the status of the snapshot prior to exiting the pre-freeze script. They also no longer require storing a temporary file on the filesystem. I still plan to add a few more enhancements, such as the ability to use the user secure store instead of a password, and possibly some log file management, although the later can also easily be handled with a simple cron job so that might be overkill.

Please test and let me know how they work. Feedback and bug reports are welcome.

The current version of the scripts can be downloaded here.

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Feb 08, 2016 10:53 pm 3 people like this post

One final update for today, I have just uploaded version 0.6 of these scripts which includes support for Secure User Store in addition to simple username/password auth. This is now the default behavior but does require some extra setup on the host. For regular username/password authentication you can just set the variables at the top of each script, the account needs only BACKUP ADMIN and CATALOG READ system privileges. However, for even more security, the script defaults to using the Secure User Store. You'll still need an account on each HANA instance with the same privileges as above, but you can then create a secure store for the OS user running the script (typically root, but can be a regular account), with encrypted credentials and you can even have separate HANA credentials for each instance. Instructions for setting this up are included in the scripts but I've also included that section below for reference. Once configured on the HANA host, the scripts themselves should need no modification at all, unless you want to use a different key prefix.

Code: Select all

# To use Secure User Store for SAP HANA authentication select a key prefix.
# This prefix will be combined with the instance number to reference a specific
# key for authentication.  For example, the default prefix is HDB, so for
# instance 00 the script will attempt to use key HDB00 to authenticate.
#
# To create Secure User Store use the following command syntax:
#
# ./hdbuserstore set <key> <host>:3<instance#>15 <user> <password>
#
# For example, to create keys for instance 00 and 01 on host "hana01"
# using a username "VEEAM" and password "Backup123" run the following commands
# as the OS user that will be running the script to create their secure store:
#
# ./hdbuserstore set HDB00 hana01:30015 VEEAM Backup123
# ./hdbuserstore set HDB01 hana01:30115 VEEAM Backup123
#
# Note that it is completely possible for the accounts to be difference for each
# instance.  The HANA account requires BACKUP ADMIN and CATALOG READ system privledges.
#
KEYPREFIX="HDB"
Scripts can be downloaded here.

I consider these being close to "production ready" but I'm definitely interested in feedback and bug reports. Also, I'm still considering adding log management and backup catalog purging into the scripts. It would add a significant additional complexity though, so feedback on the need for that is especially appreciated.

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Feb 09, 2016 4:11 am 5 people like this post

I guess I was feeling extra motivated tonight so version 0.7 has been uploaded and includes basic catalog/log backup management. Default is to look for the first snapshot older than 3 days and purge any catalog and file log backups older than this. That gives three days with which you can easily restore from your Veeam restore points and still perform point-in-time restores. Of course you can also restore from older restore points as well, to the point of the backup image but recovering to a point-in-time for older backups would require manually restoring the correct log backups. It's certainly possible that 3 days may be too much for busy environments so there are two variables in the post-thaw script where you can tune the number of days, or disable this functionality completely.

In the next day or so I'll try to add some more logging and trap some additional error conditions and I'll publish a 1.0 version if I don't get any bug reports from the beta testers. I'm also working on a short guide to describe the setup of the scripts as well as the various restore processes, but that may take until next week.

Download here

PKaufmann
Enthusiast
Posts: 36
Liked: 5 times
Joined: Oct 05, 2016 8:00 am
Contact:

Re: SAP B1 HANA Support?

Post by PKaufmann » Oct 07, 2016 7:27 am

Hi,

is there already a version 1.0 ?
Got some trouble to get version 0.6 running (pre-freeze script - unexpected error code 1) :(

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Oct 07, 2016 4:39 pm

Like so many things, I got distracted with other issues and the clients I were working with at the time reported success with version 0.7 that I posted above, so I ended up moving on to other things. I only had evaluation installs of SAP HANA and now they are expired so I don't have access to an instance to continue any work, however, the scripts can easily be run from the command line to see if they function and you may get better errors there.

dellock6
Veeam Software
Posts: 5683
Liked: 1603 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: SAP B1 HANA Support?

Post by dellock6 » Oct 08, 2016 10:49 am

You can also check this paper we published lately:
https://www.veeam.com/wp-sap-oracle-dep ... guide.html
It has been written, from the technical point of view, by one of our solution architect Andreas Neufert, and we uses special consultancy from a large SAP integrator.

Luca
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2019
Veeam VMCE #1

crackocain
Service Provider
Posts: 121
Liked: 9 times
Joined: Dec 14, 2015 8:20 pm
Full Name: Mehmet Istanbullu
Location: Turkey
Contact:

Re: SAP B1 HANA Support?

Post by crackocain » Oct 08, 2016 11:52 am

Feature Request - HANA Certified

http://scn.sap.com/docs/DOC-62799

Too many customer want to protect HANA servers are HANA certified backup software. Because of that Veeam eliminate at the start.

If Veeam in leaders at Gartner reports this feature must be in roadmap. Very important enterprise customers.
IBM, EMC, Huawei Storage Specialist - VMCEv9 - Dosbil - Turkey

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Oct 08, 2016 9:46 pm

dellock6 wrote:You can also check this paper we published lately:
https://www.veeam.com/wp-sap-oracle-dep ... guide.html
It has been written, from the technical point of view, by one of our solution architect Andreas Neufert, and we uses special consultancy from a large SAP integrator.
Just to clarify, the whitepaper is mostly about SAP frontend applications using an Oracle database on the backend, which is a common configuration, however, that has nothing to do with SAP HANA. This thread is about backing up SAP HANA, which is a competing database technology that can be used as the backend for many SAP applications, and also for custom applications. The whitepaper does include a short appendix regarding backup and restore of SAP HANA databases, but that section references the scripts in this thread and simply expounds on their use for backup and restore of SAP HANA instances.

Andreas Neufert
Veeam Software
Posts: 3701
Liked: 652 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: SAP B1 HANA Support?

Post by Andreas Neufert » Oct 10, 2016 7:33 am

crackocain wrote:Feature Request - HANA Certified

http://scn.sap.com/docs/DOC-62799

Too many customer want to protect HANA servers are HANA certified backup software. Because of that Veeam eliminate at the start.

If Veeam in leaders at Gartner reports this feature must be in roadmap. Very important enterprise customers.
Agree, just let me add here that the above scripts and the way Veeam create backups (SnapShot based) is a supported way for HANA backups, but SnapShot based backup software can not be certified at SAP.

BACKINT support (Plugin into HANA own Backup Software to save HANA Backups at the Backup vendors file/device format) is something Veeam needs to look into. BACKINT is the only way to get certified here, but as BACKINT work the way that it needs to transport all data (some TB in many cases) for a restore it is not inline with Veeams idea of fast restore. Maybe it is a way to increase acceptance doing high frequent (VM) SnapShot based backups with additional BACKINT (certified) backups once a day or week. At least this is what our Enterprise customers asking for at our events.

PKaufmann
Enthusiast
Posts: 36
Liked: 5 times
Joined: Oct 05, 2016 8:00 am
Contact:

Re: SAP B1 HANA Support?

Post by PKaufmann » Oct 10, 2016 8:39 am

tsightler wrote:Like so many things, I got distracted with other issues and the clients I were working with at the time reported success with version 0.7 that I posted above, so I ended up moving on to other things. I only had evaluation installs of SAP HANA and now they are expired so I don't have access to an instance to continue any work, however, the scripts can easily be run from the command line to see if they function and you may get better errors there.
Hi,
thanks for your answer..
I could fix the problem after running it from the command line - so all fine, now :)

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Oct 10, 2016 11:15 pm

Great! Any chance you would share with us what you needed to do?

PKaufmann
Enthusiast
Posts: 36
Liked: 5 times
Joined: Oct 05, 2016 8:00 am
Contact:

Re: SAP B1 HANA Support?

Post by PKaufmann » Oct 18, 2016 6:30 am

tsightler wrote:Great! Any chance you would share with us what you needed to do?
Sure :)

we are using the SAP Solution Manager and to monitor HANA systems.
The solution manager installs an instance called DAA but this instance has no database - but it's included in the file /usr/sap/sapservices.
The script is reading this file to get the instances for the snapshot.
As there is no database for this instance, the script stops/times out at this point.

So I created a custom file, named it "veeamsapservice" which has only the database instances in it.
Afterwards I modified the script to read this custom file instead of /usr/sap/sapservices.
That's all :)

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Oct 18, 2016 12:43 pm

Thanks for reporting this issue and glad to know that it was a fairly minor issue overall. If I can find some time I'll try to stand up my HANA environment again and see if I can come up with a way to detect this situation, or at least not error out completely when an instance with no database is detected. I basically just use the same method the SAP startup scripts use to detect instances.

bjaguar33
Lurker
Posts: 2
Liked: never
Joined: Jan 01, 2017 3:34 am
Full Name: Hasan Fakih
Contact:

Re: SAP B1 HANA Support?

Post by bjaguar33 » Jan 16, 2017 4:54 pm

Unfortunately, this script does not support HANA in an HA environment. My tests worked successfully on non-HA HANA VMs but in an HA environment, the cluster reboots the node immediately after Pre-Freeze script and performs fail-over. I don't know if I'm doing something wrong. Anyone knows a workaround for this issue?

Andreas Neufert
Veeam Software
Posts: 3701
Liked: 652 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: SAP B1 HANA Support?

Post by Andreas Neufert » Jan 16, 2017 5:39 pm

We need to sort out the root cause.

It can be VMware snapshot related or the script.
Can you please copy the script to the hana server and run both?

Which HANA DB Plattform Version is used?

mohsiniqbal368
Novice
Posts: 3
Liked: never
Joined: Jan 25, 2017 11:02 am
Full Name: Mohsin
Contact:

Re: SAP B1 HANA Support?

Post by mohsiniqbal368 » Jan 25, 2017 11:07 am

Can we use this script HANA MDC Databases? Will it freez all MDC DBs including System DB before taking snapshot?

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Jan 25, 2017 3:19 pm

mohsiniqbal368 wrote:Can we use this script HANA MDC Databases? Will it freez all MDC DBs including System DB before taking snapshot?
Unforuntately SAP HANA does not currently support snapshot style backups with Multitenant Database Containers.

mohsiniqbal368
Novice
Posts: 3
Liked: never
Joined: Jan 25, 2017 11:02 am
Full Name: Mohsin
Contact:

Re: SAP B1 HANA Support?

Post by mohsiniqbal368 » Jan 26, 2017 6:14 am

What could be the possible way of backing up such HANA VMs. One option could be take OS level backup without Pre/Thaw Scripts and augment this backup with HANA DB level backups?

tsightler
VP, Product Management
Posts: 5374
Liked: 2209 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: SAP B1 HANA Support?

Post by tsightler » Jan 26, 2017 3:15 pm

Yes, that would be one way. Probably what I would do would be configure HANA to take it's own native backups to a volume on the VM, then backup the OS and the "backup" volume using Veeam. You could keep just a 1-2 days in the native local disk backups volume, and longer term backups in Veeam. It would always be possible to restore older databases by using FLR to restore the native HANA backup files and you'd also have a way to perform instant recovery and then quickly restore the databases if a serious problem damaged the VM.

Jean
Lurker
Posts: 1
Liked: 1 time
Joined: Feb 10, 2017 12:17 am
Full Name: Junghyun Chae
Contact:

Re: SAP B1 HANA Support?

Post by Jean » Feb 10, 2017 12:58 am 1 person likes this post

crackocain wrote:Feature Request - HANA Certified

http://scn.sap.com/docs/DOC-62799

Too many customer want to protect HANA servers are HANA certified backup software. Because of that Veeam eliminate at the start.

If Veeam in leaders at Gartner reports this feature must be in roadmap. Very important enterprise customers.
Near the bottom of the link I read:

"Snapshots are not part of the Backint API specification, and currently no certification is required for 3rd party tools using HANA snapshots."

It appears that VEEAM does not require certification from SAP since it uses HANA snapshots. Being an agent-less solution VEEAM doesn't require Backint API which, conversely, is indispensable for the agent-based (legacy) backup solutions. We may argue but I personally see the backup agents as weakness. So many things can go wrong with them, obviously SAP had to ensure that they can be trusted hence the certification. But I digress.

IMHO SAP seems pretty much confident of snapshots. Well, they're simple internal SQL statements after all, unlike APIs that are meant to interface between SAP and 3rd party (and usu. adds another layer of complexity). So can we assume that VEEAM is an equally viable backup solution for SAP HANA?

For some maybe, for some others maybe not. Any thoughts?

Clemens Bertram
Influencer
Posts: 12
Liked: never
Joined: Jun 28, 2012 1:20 pm
Contact:

Re: SAP B1 HANA Support?

Post by Clemens Bertram » Mar 06, 2017 9:42 am

+1 Feature Request - HANA Certified

HANA will be important in the Future because SAP is pushing it's Customers.

mohsiniqbal368
Novice
Posts: 3
Liked: never
Joined: Jan 25, 2017 11:02 am
Full Name: Mohsin
Contact:

Re: SAP B1 HANA Support?

Post by mohsiniqbal368 » Mar 15, 2017 4:56 am

Hi,

We are using these Scripts for HANA Backup. We have set Purge Delay to 30 Days in Post/Thaw script as:

PURGELOGS="true" # Purge backup catalog and log file backups from filesystems
PURGEDAYS=30 # Purge log backups and catalog data for backups older than this

It does remove the entries in Backup Catalog but does not remove data/log backup files from filesystem. Is there any other setting to achieve this?

Regards
Mohsin

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 15 guests