Link to home
Create AccountLog in
Avatar of grish28
grish28

asked on

automate snapview snapshot via dos scripting

Does anyone has dos script to automate process of snapshot by checking if snap session is alreaydy there and snapshot is activated or not?
Avatar of Duncan Meyers
Duncan Meyers
Flag of Australia image

rem Check if existing snapshot exists. If so, stop the session and restart. Looks for H: drive.
If not exist H: goto Start

rem Run ADMsnap to deactivate existing snap (if necessary)
cd c:\"Program Files"\EMC\"Navisphere ADMSnap for Win2K"
admsnap deactivate -s Apps

rem Stop snapview session
cd c:\"Program Files"\EMC\"Navisphere CLI"
navicli -h 172.17.x.x snapview -stopsession Apps -o
rem navicli command must be run against the service processor that "owns" the LUN to be snapped

:Start

rem Start SnapView session. Name: Apps, LUN 09
cd c:\"Program Files"\EMC\"Navisphere CLI"
navicli -h 172.17.x.x snapview -startsession Apps -lun 09 -persistence
rem navicli command must be run against the service processor that "owns" the LUN to be snapped
rem Persistence flag means that the snapshot will trespass to the other SP in the event of a h/w failure.

rem Activate snapshot for session Apps. Windows will mount on drive H:
cd c:\"Program Files"\EMC\"Navisphere ADMSnap for Win2K"
admsnap activate -s Apps

rem For use with BackupExec 8.6, put StartSnapshotApps.bat in Backup Properties - Advanced
rem Commands to run - Before Backup. Use full path to the batch file. Do not use quotes in path name.
rem For example: c:\dell\snapviewscripts\StartSnapshotApps.bat
rem If modifying these scripts note that admsnap and navicli command parameters are case sensitive.
The above script is a couple of years old, and I haven't bothered updating it yet for the latest versions on SnapView, NaviSecCLI or admsnap, but it should be pretty clear what it's doing.
Avatar of grish28
grish28

ASKER

Thanks a lot for your answer. Is there any way you can mount to some mountpoint rather than drive letter may be with the help of diskpart?
ASKER CERTIFIED SOLUTION
Avatar of Duncan Meyers
Duncan Meyers
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Hi grish28,

Just curious as to why you awarded a 'B'? Surely that's worth an 'A'?
Avatar of grish28

ASKER

Hello, not sure what did i do.. let me have a look at it.. yes it is worth of A... Also one of the client wanted to mount it to some mount point rather than drive letter and unfortunately can't do that with admsnap.. so have to think about some other option either using third party tool or convince them to use RM.. thanks anyways...
No worries. Thanks!