Backup of enterprise applications (Microsoft stack, IBM Db2, Oracle, PostgreSQL, SAP)
Post Reply
janschulenburg
Influencer
Posts: 10
Liked: 3 times
Joined: Nov 21, 2019 8:04 am
Full Name: Jan Schulenburg
Contact:

SAP HANA pre-freeze and post-thaw scripts

Post by janschulenburg »

Hi,

First of all; I'm a noob on SAP HANA and barely can create backups and restores.. I'm running SAP HANA on virtual SLES 15 for SAP Applications VM's and I'm possible to use the Veeam SAP HANA Backint plugin to create backups and do restores. But wouldn't it be possible to use just Veeam Backup & Replication to backup the VM itself in a consistent state using these scripts: https://www.veeam.com/blog/optimize-bac ... ckint.html.

I've tried to implement them on Veeam B&R server using the root account for the SLES server but that doesn't seem to work.

Does anybody have this working and can assist me in getting this working?
Egor Yakovlev
Veeam Software
Posts: 2543
Liked: 687 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by Egor Yakovlev »

Hi Jan,
Local team will contact you soon to assist!
/Cheers!
janschulenburg
Influencer
Posts: 10
Liked: 3 times
Joined: Nov 21, 2019 8:04 am
Full Name: Jan Schulenburg
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by janschulenburg »

As addition to this post I've got a question who is maintaining the pre-freeze and post-thaw scripts? The scripts do work fine but what I see is that snapshots for the systemdb are removed (triggered by the ) but snapshots for the production data aren't?
StefanZ
Veteran
Posts: 369
Liked: 98 times
Joined: Mar 04, 2019 10:31 am
Full Name: Stefan Zimmermann
Location: Germany
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by StefanZ »

Hi Jan,

yes, you can use the pre- and post-scripts from Github to have a consistent VM backup. However with a snapshot backup you get not database validation which you get when running backint. For productive environments we recommend to combine these functionalities.

As you've not mentioned what kind of error you encounter on SLES15 maybe check the following two things because I've seen these before:

- Is the script properly executed? As it's copied from the VBR server we've seen issues with end of line (eol) conversions between Linux and Windows formats. If you have \r\n line endings in the file it won't be interpreted correctly and you will get an error like "cannot execute /bin/bash^M" or so. Make sure to have Linux style line endings in the .sh file.

- root is good to start the script (though not necessary), but we need a database user to take the DB snapshot - that will be likely the <SID>adm user - you can specify this user in the script/hana.conf or in the hdbuserstore.

The scripts are provided examples and community supported. If you think you can make improvements to them feel free to create a pull request with your changes. Of course we try to provide working examples, but we don't claim to fulfill every need with these scripts.
Kind regards, Stefan
johannesk
Expert
Posts: 150
Liked: 33 times
Joined: Jan 19, 2016 1:28 pm
Full Name: Jóhannes Karl Karlsson
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by johannesk »

Hi,

We upgraded our SAP HANA few days ago. After the upgrade the hana-pre-freeze.sh does not detect the HANA instance and thus the freeze operation is not done on the database.
Note that the Veeam Image backup that has the hana-pre-freeze.sh configured as pre-script, will not Error on the task 'Running pre-freeze script in the guest OS'
thus the Veeam backup job won't alarm this.

We detected this issue with the checkmk check for SAP HANA
https://checkmk.com/integrations/sap_hana_backup
It alerts the backup is not up to date.
'SAP HANA Backup HBT 00 SYSTEMDB - data snapshot'

I post this both, to warn other users so they can be aware of this. Also I would like to know if @StefanZ is working on updating the script?
https://github.com/VeeamHub/application ... s/sap-hana
I see this has been registered as an issue on the giphub page and there is a linke to a SAP note that relates to the issue
https://me.sap.com/notes/3139184

Regards,
Jóhannes
PetrM
Veeam Software
Posts: 3278
Liked: 529 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by PetrM »

Hi Johannes,

Please keep in mind that these scripts are shared by Veeam enthusiasts and are not included in the official quality control process, thus we cannot guarantee stable functioning of these scripts in every specific environment: it's up to the end user to modify scripts accordingly. Currently, nobody works with this script but we will discuss it internally and maybe would be able to find someone.

Thanks!
johannesk
Expert
Posts: 150
Liked: 33 times
Joined: Jan 19, 2016 1:28 pm
Full Name: Jóhannes Karl Karlsson
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by johannesk » 1 person likes this post

Sure Petr, I realize that the script is outside of Veeam development.
We have adapted the script by hardcoding the SAP instance name to the script, and thus have a script for each SAP instance. That was the easy way to adapt. The cool way would be to fix the dynamic functionality that had been working until now.
janschulenburg
Influencer
Posts: 10
Liked: 3 times
Joined: Nov 21, 2019 8:04 am
Full Name: Jan Schulenburg
Contact:

Re: SAP HANA pre-freeze and post-thaw scripts

Post by janschulenburg » 1 person likes this post

I've been using the pre-freeze and post-thaw scripts for more than 2 years now with full satisfaction. I do have the SAP names coded in the scripts which was easier. SureBackup tests run succesfull every month.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest