I've got an environment where I want to use Veeam as the backup tool but I'm having issues with a non VSS aware application and pre-freeze scripts.
Essentially, I need to freeze an old Oracle database and SAP system on a Windows 2003 box but the issue I have is that the shutdown scripts need to be run as a specific user. From what I can tell, Tools executes the pre-freeze script as the local system user.
How can I execute pre-freeze scripts in shutdownScripts.d as a specific user? I've tried calling the external scripts using psexec.exe to pass a username and password across but they aren't working. They are definately being called because I added an ECHO to a txt file to prove that just now.
Strangely, they do work when I call them directly from the command line and pipe "freeze" to them.
This is my script:
Code: Select all
if "%1%" == "freeze" goto doFreeze
if "%1%" == "thaw" goto doThaw
goto EOF
:doFreeze
psexc.exe -u <domain>\<username> -p <password> call <path_to_script>\script1.bat
goto EOF
:doThaw
psexc.exe -u <domain>\<username> -p <password> call <path_to_script>\script2.bat
goto EOF
:EOF