VMware Solutions Discussions

Virtual Storage Console 4.2.1 and VMware backup script syntax question

JBERG_DIGITALREALTY
2,809 Views

Environment:

ESXi 5.5

Virtual Storage Console 4.2.1

We recently upgraded from ESX 4.5 to ESXi 5.5. In the process we went from SMVI 3.0 to VSC 4.2.1. We had an SMVI job that executed a script, which is no longer working. I suspect it is the syntax that has changed, although I cannot find the new syntax requirements anywhere. The script is below; I pulled our server names out of the script and replaced them with <SERVER_NAME>.

:START

   setlocal

   Set ErrorLevel=0

   Set ExitCode=0

   if %BACKUP_PHASE% == PRE_BACKUP goto PREBACKUP

   if %BACKUP_PHASE% == POST_BACKUP goto POSTBACKUP

   if %BACKUP_PHASE% == FAILED_BACKUP goto FAILEDBACKUP

   goto END

:PREBACKUP

   start /wait psexec.exe \\<SERVER_NAME> -i -h "C:\WINDOWS\System32\EVSetBackupMode.cmd"

   set ExitCode=%ERRORLEVEL%

   goto END

:POSTBACKUP

   start /wait psexec.exe \\<SERVER_NAME> -i -h -n 10800 "C:\Program Files\NetApp\SQLBackupScript.cmd"

   start /wait psexec.exe \\<SERVER_NAME> -i -h "C:\WINDOWS\System32\EV_Create_Trigger.cmd"

   start /wait psexec.exe \\<SERVER_NAME> -i -h "C:\WINDOWS\System32\EVClearBackupMode.cmd"

   set ExitCode=%ERRORLEVEL%

   goto END

:FAILEDBACKUP

   start /wait psexec.exe \\<SERVER_NAME> -i -h "C:\WINDOWS\System32\EVClearBackupMode.cmd"

   goto END

:END

   Exit /B %ExitCode%

Here is an image of the output when running the script manually. As you can see, when I get to if %BACKUP_PHASE% == PRE_BACKUP goto PREBACKUP, the variable %BACKUP_PHASE% is missing, and the script fails to progress any further. I suspect this is because VSC doesn't know what that variable is, and it was likely defined somewhere in SMVI or was built into it, allowing that variable to be properly interpreted. Does anyone know if the script syntax requirements changed in VSC 4.2.1?

0 REPLIES 0
Public