-
- Lurker
- Posts: 2
- Liked: never
- Joined: Nov 06, 2009 9:49 am
- Full Name: Alex Henstra
- Contact:
Create a MAXDB (SAP) backup
Hi all,
I'm Looking for a way to backup some SAP server VM's with Veeam. The normal Veeam backup goes very well now and the last result is always "success". But since MaxDB is not VSS compliant ,the databases are in an inconsistent state. There must be more people in this situation ,but i can't find them with google .
Any help is appreciated.
I'm Looking for a way to backup some SAP server VM's with Veeam. The normal Veeam backup goes very well now and the last result is always "success". But since MaxDB is not VSS compliant ,the databases are in an inconsistent state. There must be more people in this situation ,but i can't find them with google .
Any help is appreciated.
-
- Chief Product Officer
- Posts: 31538
- Liked: 7058 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Create a MAXDB (SAP) backup
Hi, you can use VMware prefreeze/postthaw scripts to suspend/resume database for snapshot operation. You may need to contact MaxDB vendor to find out what commands need to be used to suspend and resume database for hot backup.
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Nov 06, 2009 9:49 am
- Full Name: Alex Henstra
- Contact:
Re: Create a MAXDB (SAP) backup
Thanks for your reply Gostev,
I wil look for the freeze and thaw scripts. If anyone has succeeded in making such scripts, please let me now.
I wil look for the freeze and thaw scripts. If anyone has succeeded in making such scripts, please let me now.
-
- VP, Product Management
- Posts: 6023
- Liked: 2852 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Create a MAXDB (SAP) backup
SAP has some techniques for performing backups using "split mirror" techniques, which is basically the same thing. A split mirror is typically how Netapp or EMC describe using their snapshot technology to create backup snapshots presented to secondary host, but conceptually it's the same.
Unfortunately I don't have access to the SAP technotes, but SAP notes 371247 and 616814 seem to be the definitive reference for SAN based snapshots (VMware snapshots are not really different). Note 616814 has the following script:
So effectively you should be able to use the concept to create a pre-freeze script to freeze the IO, and a post-thaw script to resume the logging but I must admit my experience here is minimal.
Unfortunately I don't have access to the SAP technotes, but SAP notes 371247 and 616814 seem to be the definitive reference for SAN based snapshots (VMware snapshots are not really different). Note 616814 has the following script:
Code: Select all
To create the split mirror or snapshot, proceed as follows:
dbmcli -d <database_name> -u < dbm_user>,<password>
util_connect < dbm_user>,<password>
util_execute suspend logwriter
==> Create the snapshot on the EVA
util_execute resume logwriter
util_release
exit
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Jan 10, 2011 8:24 pm
- Full Name: Ethan Hill
- Contact:
Re: Create a MAXDB (SAP) backup
Has anyone had any success with the thaw portion of this. I get a vmware snapshot error to do with non 0 return code by the custom portion of the quiesce script.
-
- Chief Product Officer
- Posts: 31538
- Liked: 7058 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Create a MAXDB (SAP) backup
Did you verify that thaw script returns zero when both pre and then post scripts are executed manually?
-
- Enthusiast
- Posts: 37
- Liked: 2 times
- Joined: Oct 30, 2009 2:43 am
- Full Name: Felix Buenemann
- Contact:
Re: Create a MAXDB (SAP) backup
Based on the info provided here and some googling, I'm now using the following freeze/saw script to backup our SAP MaxDB Windows machines:
Put the file as eg. 00_maxdb_logwriter.bat into %ProgramFiles%\VMware\VMware Tools\backupScripts.d\.
To test if it works, create a snapshot through VIMClient amd enable the quiesce filesystem checkbox.
You can find debugging info in the file c:\freeze.log, if everything went fine it should say freeze OK/IO SEQUENCE = <some number> and thaw OK.
You need to enable VMware Tools Quiesce in the Veeam Backup job options.
I'm not sure wether it makes sense to leave Veeam Backups's own VSS handler enabled or better disable it for the specific VMs.
Regards, Felix
Code: Select all
@echo off
REM %1 == freeze/thaw/freezeFail
if "%1" == "freeze" goto doFreeze
goto doThaw
:doFreeze
echo %1 >c:\freeze.log
dbmcli -d <dbname> -u <dbuser>,<dbpass> -uUTL -c "util_execute suspend logwriter" >>c:\freeze.log
goto EOF
:doThaw
echo %1 >>c:\freeze.log
dbmcli -d <dbname> -u <dbuser>,<dbpass> -uUTL -c "util_execute resume logwriter" >>c:\freeze.log
:EOF
To test if it works, create a snapshot through VIMClient amd enable the quiesce filesystem checkbox.
You can find debugging info in the file c:\freeze.log, if everything went fine it should say freeze OK/IO SEQUENCE = <some number> and thaw OK.
You need to enable VMware Tools Quiesce in the Veeam Backup job options.
I'm not sure wether it makes sense to leave Veeam Backups's own VSS handler enabled or better disable it for the specific VMs.
Regards, Felix
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Sep 29, 2015 6:29 am
- Full Name: Hendrik Hackmann
- Contact:
[MERGED] Backup VM with SAP and MaxDB
Hello,
is anyone using VEEAM to Backup a VMWARE Guest with SAP and MaxDB?
Is there any documented and certified way to do this?
I look forward to receiving your feedback
Thanks
Hendrik
is anyone using VEEAM to Backup a VMWARE Guest with SAP and MaxDB?
Is there any documented and certified way to do this?
I look forward to receiving your feedback
Thanks
Hendrik
-
- Product Manager
- Posts: 6495
- Liked: 753 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Backup VM with SAP and MaxDB
Hi,
Currently the only way to backup some unsupported database is to use pre/post guest script approach, see above. Starting v8, using these scripts can be fully automated in the backup job, as a part of guest processing.
Thank you.
Currently the only way to backup some unsupported database is to use pre/post guest script approach, see above. Starting v8, using these scripts can be fully automated in the backup job, as a part of guest processing.
Thank you.
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
Starting from 7.8.02 and 7.9 it isn´t anymore supported to stop the log writer with above script. The replacement commands for this can be found in the SAPNOTE 1928060
-
- Novice
- Posts: 3
- Liked: never
- Joined: Jun 01, 2016 12:03 pm
- Full Name: Frank Wagner
- Contact:
Re: Create a MAXDB (SAP) backup
You can also use our MaxDB VSS Writer (see http://www.maxback.io).
It has been created by our company explicitly for integration with Veeam and has been released as part of our MaxDB backup solution recently.
Best Regards,
Frank
It has been created by our company explicitly for integration with Veeam and has been released as part of our MaxDB backup solution recently.
Best Regards,
Frank
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
very cool, thank you.
Is the VSS Writer free or paid?
Is the VSS Writer free or paid?
-
- Novice
- Posts: 3
- Liked: never
- Joined: Jun 01, 2016 12:03 pm
- Full Name: Frank Wagner
- Contact:
Re: Create a MAXDB (SAP) backup
It is a paid solution.Is the VSS Writer free or paid?
If you what to know more just send me an email or use the contact form on http://www.maxback.io.
Best Regards,
Frank
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
[MERGED] VBR and MAXDB snapshots
Hi All
Hoping someone can perhaps share some information and tips with regards to backing up SAP running MAXDB which isnt VSS compatible. What would be the best way have consistent backups of this SAP MAXDB database?
Any assistance would be appreciated.
Kind Regards
Hoping someone can perhaps share some information and tips with regards to backing up SAP running MAXDB which isnt VSS compatible. What would be the best way have consistent backups of this SAP MAXDB database?
Any assistance would be appreciated.
Kind Regards
-
- VP, Product Management
- Posts: 27278
- Liked: 2770 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Create a MAXDB (SAP) backup
Hi Thys, if VSS cannot be used, then pre-freeze/post-thaw scripts should be a way to go. Thanks!
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
Hi, i assume these pre-freeze/post-thaw scripts pauses the database and stop any connections made to it during the backup window?Vitaliy S. wrote:Hi Thys, if VSS cannot be used, then pre-freeze/post-thaw scripts should be a way to go. Thanks!
-
- VP, Product Management
- Posts: 27278
- Liked: 2770 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Create a MAXDB (SAP) backup
Yes, you're spot on.
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
As Tom wrote above, there is anothe method that do online backup:
Veeam Pre Script:
Veeam PostScript:
Veeam uses a VMware SnapShot (or Volume SnapShot at Hyper-V) that bring all VM volumes at same time into the snapshot which is inline with the MaxDB requirements.
Veeam Pre Script:
Code: Select all
dbmcli –d <database> -u <DBMuser>,<password>
util_connect <DBMuser>,<password>
util_execute suspend logwriter
exit
Code: Select all
dbmcli –d <database> -u <DBMuser>,<password>
util_connect <DBMuser>,<password>
util_execute resume logwriter
util_release
exit
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
Thank you very much. we will give this a try.
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
Hi All
Any idea why the Pre Script would fail when running the job? The account we are using are domain admin. When we use the local administrator the scripts runs but times out after few minutes. When i run the script manually on the server it never goes past the first line in the script.
dbmcli –d <database> -u <DBMuser>,<password>
util_connect <DBMuser>,<password>
util_execute suspend logwriter
exit
Is there any specific OS permissions the account need to run scripts on the VM?
Any input would be appreciated.
Any idea why the Pre Script would fail when running the job? The account we are using are domain admin. When we use the local administrator the scripts runs but times out after few minutes. When i run the script manually on the server it never goes past the first line in the script.
dbmcli –d <database> -u <DBMuser>,<password>
util_connect <DBMuser>,<password>
util_execute suspend logwriter
exit
Is there any specific OS permissions the account need to run scripts on the VM?
Any input would be appreciated.
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
Maybe you used an Windows Editor for this script?
Windows uses other new line commands.
Download an editor that support Unix linefeed. Open the script an convert it to unix.
Or you can create with vi the script on the linux system and copy it later to the Veeam server.
Windows uses other new line commands.
Download an editor that support Unix linefeed. Open the script an convert it to unix.
Or you can create with vi the script on the linux system and copy it later to the Veeam server.
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
I've just used NotePad++ to convert the script into Unix format and its still doing the same. When I use the Domain Admin account the script fails immediately, unable to run the script and when I use the local admin account the script runs, but runs for 10 minutes then times out. Its something to do with permissions or execution of the script. I have also disable UAC to see if this is not causing the problems.
Any other ideas?
Any other ideas?
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
Oh I missed the Windows thing here. In most cases customers uses Linux with maxDB. (So the Unix Editor will not work at all.... again sorry).
So you say that your MaxDB VM runs on Windows.
Please do the following.
Goto the MaxDB VM.
Open a command line and execute the above commands one by one. Maybe you will see a error there. It is maybe needed that you give the script the full path to the dbmcli.
When the commands run successfully in the Command line, create a .bat file on the system and run them again. (Login with the same User you will later give Veeam for GuestInteraction).
If this script runs then, you can copy it to the Veeam Server.
Create a new directory and check that Veeam Service account and "System" has access to that folder.
Go to the Veeam Job and add the Max DB Server. Enable Guest Interaction and under the VM add the Scripts. (do not add the script under "Storage-Advanced-Scripts" as it will not execute this in the VM).
Press the "Test" button and have a look that RPC communication is possible. (VIX communication not needed).
Run the Job.
So you say that your MaxDB VM runs on Windows.
Please do the following.
Goto the MaxDB VM.
Open a command line and execute the above commands one by one. Maybe you will see a error there. It is maybe needed that you give the script the full path to the dbmcli.
When the commands run successfully in the Command line, create a .bat file on the system and run them again. (Login with the same User you will later give Veeam for GuestInteraction).
If this script runs then, you can copy it to the Veeam Server.
Create a new directory and check that Veeam Service account and "System" has access to that folder.
Go to the Veeam Job and add the Max DB Server. Enable Guest Interaction and under the VM add the Scripts. (do not add the script under "Storage-Advanced-Scripts" as it will not execute this in the VM).
Press the "Test" button and have a look that RPC communication is possible. (VIX communication not needed).
Run the Job.
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
Thanks, ok when running the commands one-by-one we get the following. I ran the commands in 2 different command prompt windows, Standard User and Elevated Command prompt (Administrator)
These commands were run with the Veeam service account on the MaxDB VM
Standard User: First command failed, so no need to run the rest.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\removed>D:\SAPDB\PBD\DB\PGM\dbmcli.exe -d PBD -u control,<removed>
Can not open file 'D:\sapdb\data\wrk\dbmsrv_removed.err'.
(System error 5; Access is denied.)
Error! Connection failed to node (local) for database PBD:
-24700,ERR_DBMSRV_NOSTART: Could not start DBM server.
-24832,ERR_SHMNOTAVAILABLE: Shared memory not available
-24827,ERR_SHMALLOCFAILED: ID D:\sapdb\data\wrk\PBD.dbm.shi, requested size 2608
6,Creating shared memory file D:\sapdb\data\wrk\PBD.dbm.shi failed, rc = 183.
C:\Users\removed>
Administrator:
C:\Windows\system32>D:\SAPDB\PBD\DB\PGM\dbmcli.exe -d PBD -u control,removed
D:\SAPDB\PBD\DB\PGM\dbmcli.exe on PBD>util_connect control,removed
OK
---
D:\SAPDB\PBD\DB\PGM\dbmcli.exe on PBD>util_execute suspend logwriter
OK
IO SEQUENCE = 28870124
---
D:\SAPDB\PBD\DB\PGM\dbmcli.exe on PBD>
C:\Windows\system32>
The assumption here is, that Veeam is trying to run the script on the MaxDB VM as a Standard user without Elevated rights. The service account and "System" have full access to the folder where the scripts are stored.
These commands were run with the Veeam service account on the MaxDB VM
Standard User: First command failed, so no need to run the rest.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\removed>D:\SAPDB\PBD\DB\PGM\dbmcli.exe -d PBD -u control,<removed>
Can not open file 'D:\sapdb\data\wrk\dbmsrv_removed.err'.
(System error 5; Access is denied.)
Error! Connection failed to node (local) for database PBD:
-24700,ERR_DBMSRV_NOSTART: Could not start DBM server.
-24832,ERR_SHMNOTAVAILABLE: Shared memory not available
-24827,ERR_SHMALLOCFAILED: ID D:\sapdb\data\wrk\PBD.dbm.shi, requested size 2608
6,Creating shared memory file D:\sapdb\data\wrk\PBD.dbm.shi failed, rc = 183.
C:\Users\removed>
Administrator:
C:\Windows\system32>D:\SAPDB\PBD\DB\PGM\dbmcli.exe -d PBD -u control,removed
D:\SAPDB\PBD\DB\PGM\dbmcli.exe on PBD>util_connect control,removed
OK
---
D:\SAPDB\PBD\DB\PGM\dbmcli.exe on PBD>util_execute suspend logwriter
OK
IO SEQUENCE = 28870124
---
D:\SAPDB\PBD\DB\PGM\dbmcli.exe on PBD>
C:\Windows\system32>
The assumption here is, that Veeam is trying to run the script on the MaxDB VM as a Standard user without Elevated rights. The service account and "System" have full access to the folder where the scripts are stored.
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
Ok, so made some progress. Its definitely related to some sort of permission issue on the MaxDB VM. With the Domain Administrator account the pre-freeze script executes fine, howerver with the newly created service account thats part of the Domain Admin group, it does not work. I have also given the service account the following User rights assignments
Act as part of the operating system
Backup files and directories
Log on as a batch job
Log on as a service
Restore files and directories
Still not working with the service account. Any ideas what OS permissions are required for the service account?
Act as part of the operating system
Backup files and directories
Log on as a batch job
Log on as a service
Restore files and directories
Still not working with the service account. Any ideas what OS permissions are required for the service account?
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
you are right.
Maybe save the bat file to the system, create a shortcut to it and enable under advanced the run as administrator privileges.
If this runs ok. you can create another script that start the Linkx name.lnk from the Veeam script.
This is just an idea from googling.
Another option would be to create a windows (planned task) and allow runs as admin there.
Then you can start the planned task if needed.
Maybe save the bat file to the system, create a shortcut to it and enable under advanced the run as administrator privileges.
If this runs ok. you can create another script that start the Linkx name.lnk from the Veeam script.
This is just an idea from googling.
Another option would be to create a windows (planned task) and allow runs as admin there.
Then you can start the planned task if needed.
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Jul 11, 2016 1:57 pm
- Full Name: Thys Basson
- Contact:
Re: Create a MAXDB (SAP) backup
Resolved our issue. This was related to UAC. Local Policies > Security Settings. In the right pane you will see a setting User Account Control: Turn on Admin Approval Mode change this to disabled
Had to disable UAC to get it to work with the new service account, not ideal, but it will do for now. Now we will just have to test the consistency of the MaxDB to make sure the backups are fine.
We also adjusted the batch file to have everything in 1 line.
Pre-freeze
dbmcli.exe -d Database -u user,password -uUTL -c util_execute suspend logwriter
Post-freeze:
dbmcli.exe -d Datagase -u user,password -uUTL -c util_execute resume logwriter
Had to disable UAC to get it to work with the new service account, not ideal, but it will do for now. Now we will just have to test the consistency of the MaxDB to make sure the backups are fine.
We also adjusted the batch file to have everything in 1 line.
Pre-freeze
dbmcli.exe -d Database -u user,password -uUTL -c util_execute suspend logwriter
Post-freeze:
dbmcli.exe -d Datagase -u user,password -uUTL -c util_execute resume logwriter
-
- VP, Product Management
- Posts: 6914
- Liked: 1465 times
- Joined: May 04, 2011 8:36 am
- Full Name: Andreas Neufert
- Location: Germany
- Contact:
Re: Create a MAXDB (SAP) backup
thx for the feedback.
-
- Expert
- Posts: 149
- Liked: 34 times
- Joined: May 01, 2012 11:56 am
- Full Name: Stuart Green
- Contact:
Re: Create a MAXDB (SAP) backup
SAPNOTE 1928060 statesAndreas Neufert wrote: ↑May 18, 2016 8:02 am Starting from 7.8.02 and 7.9 it isn´t anymore supported to stop the log writer with above script. The replacement commands for this can be found in the SAPNOTE 1928060
Procedure with DBMCLI
1. Perform a complete data backup
a. Start the DBMCLI and log onto the database:
Code: Select all
dbmcli -d <database_name> -u <dbm_operator>,<password>
Code: Select all
db_connect
Code: Select all
backup_start <backup_template> data
OK
Returncode -8020
...
Max Used Data Page
0
...
In this case, the return code -8020 along with the value 0 for the maximum number of used data pages (Max Used Data Page) indicates that the complete data backup was started successfully.
2. Perform the external file system backup of the data volumes.
Leave the DBMCLI session open. Perform your external file system backup of the data volumes.
3. End the complete data backup.
Once the external file system backup of the data volumes is complete, enter the DBM command backup_finish and specify an external backup ID (EXTERNAL BACKUP ID) freely chosen by yourself:
Code: Select all
backup_finish <backup_template> ExternalBackupID <external_backup_ID>
Q: How can you use pre-freeze and post-thaw when Step 2 states to leave the session open. I'm a bit confused. HELP.
(I am not a DBA expert)
Also I am using MAXDB 7.8.0.2 on Linux
Thanks.
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Feb 15, 2021 2:25 pm
- Full Name: Jurgen Baert
- Contact:
Re: Create a MAXDB (SAP) backup
@stuartmacgreen
Where facing the same challenge and wanted to check if you found a solution to backup MAXDB with veeam.
Thanks,
Jurgen
Where facing the same challenge and wanted to check if you found a solution to backup MAXDB with veeam.
Thanks,
Jurgen
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 149 guests