VMware
1 2 3 4 Previous Next 55 Replies Last post: Dec 30, 2008 5:06 AM by solsie   Go to original post
Click to view walter81's profile Lurker 4 posts since
Dec 4, 2007

nope, as you can see in my post I've included the full path

I've rebooted the server (didn't do that yesterday),but that doesn't make a difference. I've been playing with the script, but I can't find any errors.

Vshadow -q tells me that there are no shadow copies on the system, so that isn't the problem either.

Any other suggestions (or another way to make backups of my virtual servers ?)

Click to view mpierce's profile Lurker 4 posts since
Feb 1, 2007

I am having problems getting the script to run - it shuts down the virtual machine but doesn't seem to do anything else. I commented the On Error Resume Next and this is the error I am getting:

C:\WINDOWS\SysWOW64>cscript c:\vm-backupscript\vm-vss-backup.vbs "e:\Virtual Machines\VM-FFTEST1\Windows XP Professional.vmx"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

c:\vm-backupscript\vm-vss-backup.vbs(659, 1) (null): The system cannot find the file specified.

I am running Win 2003 Server x64 so I am running the script from the SysWOW64 folder to use the appropriate version of csript as mentioned earlier. I can run vshadow and 7za from the command line and I have commented the FileObject.Delete statements and am not finding copyfiles.bat anywhere so I would assume it is not creating the batch files correctly.


Thanks for your help - this script looks like a great solution for minimizing downtime.


Matt

Click to view Gigaguy's profile Novice 17 posts since
Dec 2, 2007
zgn,

There is a tool called dosdev.exe Which may allow skipping of the "copy" step. I tried it manually and it worked perfectly.

(Usage Ex: "dosdev X: %SHADOW_DEVICE_1%")

Just a thought to maybe add to your script, may make it even faster.
Click to view mpierce's profile Lurker 4 posts since
Feb 1, 2007
It is running from the location now and copies the files - but it errors when it tries to run the 7za command. I have echoed the backup_string so I can see what it is trying to pass and if I type that string into the command line it works fine. Here is the screen dump -

C:\VM-BackupScript>cscript vm-vss-backup.vbs "e:\Virtual Machines\VM-FFTEST1\Windows XP Professional.vmx"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

trying to compress
7za a -tzip "E:\backups\VM-FFTEST1-2007-12-06-215836.zip" "E:\temp\\VM-FFTEST1\*" (This is the echoed backup_string)
C:\VM-BackupScript\vm-vss-backup.vbs(689, 1) (null): The system cannot find the file specified.

Thanks

Click to view mpierce's profile Lurker 4 posts since
Feb 1, 2007
I copied the 7za executable into the same directory and it is working now.
Click to view Gigaguy's profile Novice 17 posts since
Dec 2, 2007
DosDev can be found in "MPSRPT_Exchange.EXE"

http://www.microsoft.com/downloads/details.aspx?FamilyID=cebf3c7c-7ca5-408f-88b7-f9c79b7306c0&DisplayLang=en

I just kicked off the exe and went to, "C:\WINDOWS\MPSReports\Exchange\bin" and there it was.
Click to view walter81's profile Lurker 4 posts since
Dec 4, 2007

still no success '( '( '(

in the temp folder a copy of the machine's file do appear, but that's it. :'(

Click to view mpierce's profile Lurker 4 posts since
Feb 1, 2007
Try putting the 7za files in the same directory as the script. That fixed it for me.
Click to view Gigaguy's profile Novice 17 posts since
Dec 2, 2007
I found out that we dont even need dosdev. Vshadow.exe can mount a drive.

Run the script below by typing scriptname.cmd shadowdrive targetdrive (scriptname.cmd e: o:). Found Here (http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx)

I have been trying to integrate it into your script, but have not been very sucessfull yet.

Here is a sample script:
setlocal
if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK
set SOURCE_VOLUME=%1
set DESTINATION_VOLUME=%2
set CALLBACK_SCRIPT=%~dpnx0
set TEMP_GENERATED_SCRIPT=GeneratedVarsTempScript.cmd
%~dp0\vshadow.exe -nw -p -script=%TEMP_GENERATED_SCRIPT% -exec=%CALLBACK_SCRIPT% %SOURCE_VOLUME%
del /f %EMP_GENERATED_SCRIPT%
@goto :EOF
:IS_CALLBACK
setlocal
call %TEMP_GENERATED_SCRIPT% %~dp0\vshadow.exe -el=%SHADOW_ID_1%,%DESTINATION_VOLUME%
@echo.
@echo *******************************************
@echo To delete the shadow copy, run the command:
@echo VSHADOW.EXE -ds=%SHADOW_ID_1%
@echo *******************************************
@echo.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities