Template Scripts for Generic Enabler Implementation with HP EVA



===================== Typical HP EVA Snap Script for RD Generic Enabler ===================
@ECHO OFF

REM This is an example script
REM It will be used by Generic Enabler of Recovery Director to manage snapshot for HP EVA Subsystem.

REM -- Required Vars
set evmjob=RD
set remotehost=olympus.devemc.company.com
set localhost=athena.devemc.company.com
set shortlocalhost=athena
set HPBaseDir=C:\Program Files\Compaq\Sanworks\Enterprise Volume Manager\bin
set ScriptDir=c:\GEScripts\HPEVA
set RemoteScriptDir=c:\GEScripts\HPEVA
set GalaxyBaseDir=<software installation path>\Base
set CV_ERRORLEVEL=0

REM Delete the dangling snapshots
"%HPBaseDir%\evmcl.exe" SMAD307FK34H036 undo "%evmjob%"
if not errorlevel 0 goto Abort

REM Create snap-clone
"%HPBaseDir%\evmcl.exe" SMAD307FK34H036 run "%evmjob%"
if not errorlevel 0 goto Abort


REM Execute gesnap.exe to populate the CS database
"%GalaxyBaseDir%\gesnap.exe" update create -src X: -dest X: -desthost %remotehost% -mp X: -uniqueid 10000 -vm <InstanceName*> -cn <ClientName>
if not errorlevel 0 goto Abort

* InstanceName is the name used for a Recovery Director instance (by default it is Instance001).


REM Exit clean
set CV_ERRORLEVEL=0
goto Exit

:Abort
echo An error occurred during batch file execution.
set CV_ERRORLEVEL=1
goto Exit

:Exit
@echo off
@echo ERRORLEVEL=%ERRORLEVEL%
@echo CV_ERRORLEVEL=%CV_ERRORLEVEL%
==================================================================================


==================== Typical HP EVA Unsnap Script for RD Generic Enabler ==================
@ECHO OFF

REM This is an example script
REM It will be used by Generic Enabler of Recovery Director to delete snapshot for HP EVA Subsystem.

REM -- Required Vars
set evmjob=RD
set remotehost=olympus.devemc.company.com
set localhost=athena.devemc.company.com
set shortlocalhost=athena
set HPBaseDir=C:\Program Files\Compaq\Sanworks\Enterprise Volume Manager\bin
set ScriptDir=c:\GEScripts\HPEVA
set RemoteScriptDir=c:\GEScripts\HPEVA
set GalaxyBaseDir=<software installation path>\Base
set CV_ERRORLEVEL=0

REM Unmount and Delete the snapshots
"%HPBaseDir%\evmcl.exe" SMAD307FK34H036 undo "%evmjob%"
if not errorlevel 0 goto Abort

REM Exit clean
set CV_ERRORLEVEL=0
goto Exit

:Abort
echo An error occurred during batch file execution.
set CV_ERRORLEVEL=1
goto Exit

:Exit
@echo off
@echo ERRORLEVEL=%ERRORLEVEL%
@echo CV_ERRORLEVEL=%CV_ERRORLEVEL%
==================================================================================