I would do the test in a script that executes immediately before your 
diskshadow execution.

Use VSSADMIN LIST SHADOWS to look at the existing shadows. With PowerShell, 
parsing the messy output is a snap. Again using VSSADMIN, delete the "bad" 
shadowcopies.

Alternately,  you could run something like this immediately AFTER your 
diskshadow script. Diskshadow returns a non-zero value if it fails.

________________________________
From: Joseph L. Casale [[email protected]]
Sent: Wednesday, June 17, 2009 1:30 PM
To: NT System Admin Issues
Subject: Diskshadow Script

I am trying to make a simple diskshadow script a bit more fault tolerant.
If for any reason the backup fails to finish and drop the exposed drive, it 
can’t restart on the next schedule.
I know I guess I could start the script with an exec and call a batch file that 
checks for the drive letter and if it exists, then try to drop it. assuming it 
was an exposed snap?

Any ideas on what’s the best way to handle this? How can I test for the drive 
type in the initial exec’ed batch file if it is infact an exposed snap and not 
an accidentally mapped drive? How can I pass status or variables back into the 
diskshadow script based on what the exec’ed batch file does?

Thanks!
jlc





~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to