Hello to all,
I have a big problem with MySql service when VCB script starts: i have noticed that when vcb script starts, the Mysql service doesn't work....(the state of this service is started but I didn't connect to the databases....So I insert a new row in my VCB script for restart Mysql service but the problem is that when mysql service doesn't work,the applications didn't save the new data into DBs and it's a big problem....For me it's a VCB problem...How can i solve it? Thank's to all for the answers..
Which kind of guest OS do you have?
The problem it's only during the snapshot? Or all the time for the backup operation?
Do you have some custom guest script that are called by VCB?
Andre
VCB does NOT get along with transactional services. I post this at least once per day....You could use the pre-freeze-script and post-thaw-script functionality to stop and restart the services. The location of the scripts depend on your OS and VMware Tools versions. This is explained in my VCB Proven Practice Guide on VI:OPS -> http://viops.vmware.com/home/docs/DOC-1392
Dave Convery, VCDX
VMware vExpert 2009
http://www.dailyhypervisor.com
Careful. We don't want to learn from this.
Bill Watterson, "Calvin and Hobbes"
are you using vcMounter directly or using pre-command to take the backup?
If your mySQL is on linux please check for pre-freeze and post-thaw scripts which are used for backup.
I guess this is VCb15.
Thanks for the answers.... I have my custom vcb script in W2003ext1 that provide vcb snapshot of VMs to an external disk.... I take snapshot of 5 VMs and only for the w2003mysql1 I have this problem of mysql service that don't work correctly... The mysql system is installed on windows server 2003 system and i see the problem when VCB script start on Sunday night..... In that moment the mysql service "dead"....so i think that the problem is the start of vcb script.....but i don't know which is the cause...
In the other VMs also do you have mysql running?
If on other Vms also you have mysql running without any issues with the same customised script, then we can say that it is not VCB issue.
If only this VM has mysql, then can you please post:-
-> Is the mysql failing during the creation of snapshot?
->Are you using VSS or sync driver for quescing?
-> If VSS can you please check the eventvwr of the VM if it has any errors reported by VSS?
-> Even if the backup fails , is mysql still not working?
Read the doc that I linked above. It explains how to use VCB and the pre-freeze and post-thaw scripts to stop and restart the services during the snapshot stage.
Dave Convery, VCDX
VMware vExpert 2009
Careful. We don't want to learn from this.
Bill Watterson, "Calvin and Hobbes"
Hi,
i'm interested in pre-freeze script and post-thaw script... I want to know how can use it, how can configure it and where i can find it...
i have read some posts searching this argument by google and i find these info:
"You must place the script on the Virtual Machine you want to back up in the following file: C:\Program Files\VMware\VMware Tools\backupScripts.d"
and
"VCB document says the freeze and thaw scripts should be in /usr/sbin/pre-freeze-script and /usr/sbin/post-thaw-script"
...but i don't understand nothing...
Is There a very kind person who could give me a procedure to use?
Where can i find these scripts? Where must i put these scripts? And,how it function?
Thanks in advance!
can u write simple batch files?
Something like this will do...
IF “%1%” == “freeze” goto doFreeze goto postThaw :postThaw IF “%1%” == “thaw goto doThaw goto fail :doFreeze net stop mysql goto EOF :doThaw net start mysql goto EOF :fail echo “$ERRORLEVEL% >> vcbError.txt :EOF
Like I said... READ this doc -> http://viops.vmware.com/home/docs/DOC-1392
Dave Convery, VCDX
VMware vExpert 2009
http://www.dailyhypervisor.com
Careful. We don't want to learn from this.
Bill Watterson, "Calvin and Hobbes"
Hi,
i have read the doc but i have some doubts.... i have understand that i create a script "backupScripts.d" with the code that i have interested in, it will invoke automatically when VCB script running and detect a freeze or a thaw.... is it true? if no,how can i invoke this external script into my VCB script?
I put my custom script in "%ProgramFiles%\VMware\VMware Tools\backupScripts.d" because i run VCB scripts into windows server... is it ok? (i don't put this script into vmware system)
OK. So, using the example on pg 6:
</p></p> <p><p>IF “%1%” == “freeze” goto doFreeze <br/><br/> goto postThaw <br/><br/></p></p> <p><p>:postThaw <br/><br/> IF “%1%” == “thaw goto doThaw <br/><br/> goto fail <br/><br/></p></p> <p><p>:doFreeze <br/><br/> net stop mysql <br/><br/> goto EOF <br/><br/></p></p> <p><p>:doThaw <br/><br/> net start mysql <br/><br/> goto EOF <br/><br/></p></p> <p><p>:fail <br/><br/> echo “$ERRORLEVEL% >> vcbError.txt <br/><br/></p></p> <p><p>:EOF <br/><br/> <br/><br/>
This would go on the VM under "%ProgramFiles%\VMware\VMware Tools\backupScripts.d". You can call it vcb.bat or vcb.cmd. The VCB snapshot process will call the batch file automagically. You will need to have VMware Tools installed as indicated in the doc in order for this to work. If you have doubts, test it before putting it in production. I would recommend that you test backing up AND restoring the VM.
Dave Convery, VCDX
VMware vExpert 2009
http://www.dailyhypervisor.com
Careful. We don't want to learn from this.
Bill Watterson, "Calvin and Hobbes"