rick2021
asked on
Script to backup PST files w/ vshadow.exe
I need a script that uses CopyWithVSS.cmd (the code below) and vshadow.exe to backup multiple PST files -i've tried this in the past and I could not get it to work...
setlocal
@REM test if we are called by VSHADOW
if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK
@REM
@REM Get the source and destination path
@REM
set SOURCE_DRIVE_LETTER=%~d1
set SOURCE_RELATIVE_PATH=%~pnx1
set DESTINATION_PATH=%2
@REM
@REM Create the shadow copy - and generate env variables into a temporary script.
@REM
@REM Then, while the shadow is still live
@REM recursively execute the same script.
@REM
@echo ...Determine the scripts to be executed/generated...
set CALLBACK_SCRIPT=%~dpnx0
set TEMP_GENERATED_SCRIPT=GeneratedVarsTempScript.cmd
@echo ...Creating the shadow copy...
c:\vshadow.exe -script=%TEMP_GENERATED_SCRIPT% -exec=%CALLBACK_SCRIPT% %SOURCE_DRIVE_LETTER%
del /f %TEMP_GENERATED_SCRIPT%
@goto :EOF
:IS_CALLBACK
setlocal
@REM
@REM This generated script should set the SHADOW_DEVICE_1 env variable
@REM
@echo ...Obtaining the shadow copy device name...
call %TEMP_GENERATED_SCRIPT%
@REM
@REM This should copy the file to the right location
@REM
@echo ...Copying from the shadow copy to the destination path...
copy "%SHADOW_DEVICE_1%\%SOURCE_RELATIVE_PATH%" %DESTINATION_PATH%
:end
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Exactly what the PST Backup utility is designed for.
ASKER
This utility does not do it if Outlook is open which is exactly what we need it to do - we are using a piece of backup software called Robocopy...we need it to use the code above or something that works with the vshadow and CopyWithVSS.cmd code...we really need this.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
ASKER
Open in new window