Host-based backup of VMware vSphere VMs.
Post Reply
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

freeze script

Post by kornelg »

Hello,
i have seen the posts for the prefreeze scripts ,i tried these but it doesnt work.
What i am trying to do is to stop a Sybase DB when the backup starts and then to start it again.

Code: Select all

echo 
echo %DATE%
echo %TIME%
set datetimef=%date:~-4%_%date:~3,2%_%date:~0,2%__%time:~0,2%_%time:~3,2%_%time:~6,2%
echo %datetimef% >> c:\vadp.log


if "%1%" == "" goto noparam
if "%1%" == "freeze" goto freeze
if "%1%" == "thaw" goto thaw
if "%1%" == "freezeFail" goto freezeFail
goto wrongparam

:freeze
REM before snapshot
echo "Freeze" >> %datetimef%
REM net stop "Sybase"
goto end

:thaw
REM after snapshot
echo "Thaw" >> %datetimef%
REM net start "Sybase"
goto end

:freezeFail
REM snapshot failed
echo "freezeFail" >> %datetimef%
goto end

:noparam
REM invalid program usage
echo "Parameter not specified" >> %datetimef%
goto end

:wrongparam
REM invalid program usage
echo "Invalid parameter" >> %datetimef%

:end
echo "End reached" >> %datetimef%
When i am doublecklicking it makes only thelog with date and time.Normal but when veeam starts the backup it doesnt shut down the Service.Enabled is AAIp and vmware tools quiscence.
The script are in Windows folder and also at vmware tools folder.
is there anything that i should do?
foggy
Veeam Software
Posts: 21069
Liked: 2115 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: freeze script

Post by foggy »

John, in fact, you need to disable application-aware image processing, if you're using pre-freeze/post-thaw scripts, and have only VMware tools quiescence enabled.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

Also, it might be worth checking whether the scripts will be triggered by VMware itself. Create a VM snapshot manually with quiescence enabled and see whether the scripts are executed. Thanks.
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

Re: freeze script

Post by kornelg »

i have tried without AAIP and the backup wasnt succesful.It stopped.
Is the script right.?
I am trying that with MS SQL service because i dont have the sybase.it is for a customer.i wanted to see if that script stops the sql service.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

As mentioned, you should disable AAIP, so that, the VMWare native quiesce is used. Can you elaborate on what specific errors you got? Also, I doubt that scripts written for Sybase would work in case of MS SQL due to underlying differences. Thanks.
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

Re: freeze script

Post by kornelg »

At this script i have as example Sybase but for the MS SQL where SYbase is i write SQL Server.
There is an error occured saving the snapshot:
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

At this script i have as example Sybase but for the MS SQL where SYbase is i write SQL Server.
Can you elaborate on it, as I'm slightly confused by this statement?
There is an error occured saving the snapshot:
Unfortunately, either the screenshot or error description is missing. Have you come across this issue?

Thanks.
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

Re: freeze script

Post by kornelg »

i meant that where sybase is in script i use SQL Server.
Deselected the AAIP cant do backup of that VM,vmware tools quiscence is enabled.It hasnt got heavy workload this vm that i am trying to test.
Should i change something else at the script?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

Deselected the AAIP cant do backup of that VM
So, what particular error message did you get?
i meant that where sybase is in script i use SQL Server.
You should check sybase script against sybase database and see whether the database gets frozen correctly. If it does, then, check whether the scripts can be executed by VMware properly (manual snapshot with quiescence enabled). Then, if everything looks good, but VB&R still is unable to trigger pre-freeze/post-thaw script, open a ticket with our support team and let them investigate it directly.
Should i change something else at the script?
From my perspective, Sybase community might have a better understanding in regards to sybase freeze/thaw scripts.

Thanks.
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

Re: freeze script

Post by kornelg »

Code: Select all

Creating VM snapshot

Error: Fehler beim Speichern des Snapshots: Das Stilllegen der virtuellen Maschine ist fehlgeschlagen. 
Sorry in German!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

I believe your issue is similar to this one. Anyway, without AAIP VB&R takes snapshot in the same manner as VMware does. So, I'm wondering what happens if you just take the snapshot manually (quiescence enabled), using vSphere Manager. Will you be able to do so? Thanks.
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

Re: freeze script

Post by kornelg »

I can take snapshot.!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

Then, please, open a ticket with our support team and let them analyze your environment, as VB&R should work flawlessly with or without AAIP. Thanks.
kornelg
Enthusiast
Posts: 36
Liked: never
Joined: Mar 14, 2013 8:19 am
Full Name: John chr
Contact:

Re: freeze script

Post by kornelg »

it works ,i have deleted the REM from the script and it works.!!Deselected AAIP, vmtools quiscence enabled!
thanks a lot!!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: freeze script

Post by veremin »

Glad to hear you're up and running now. Feel free to ask, if additional clarification is needed.
Post Reply

Who is online

Users browsing this forum: No registered users and 81 guests