cancel
Showing results for 
Search instead for 
Did you mean: 

Pre Job - The system cannot find the path specified.

Tobias_P_
Level 4

Hello,

OS: Windows Server 2008 R2 Standard, Backup Exec: 2010 R3 (up to date)

Simple Backup Job, which one is saving just remote files.

 

Pre <d:\scripte\server_down.bat>

Post <d:\scripte\server_up.bat>

Both scripts running, if I start them manually.

All I found was: TECH90733 - "A backup configured to use a batch file in a Pre/Post command does not execute the batch file" but the service is still running as Local System Account

 

Anyone some idea?

Greetings!

Tobias

1 ACCEPTED SOLUTION

Accepted Solutions

Tobias_P_
Level 4

Got it!!!

After many hours testing some ways, I've got a solution.

Settings that doesn't work:

\\Server\scripts\sapdown.bat (run it on the remote server)

PsExec.exe \\server -u domain\SIDadm -p password "\\Server\scripts\sapdown.bat" (run it on the media server)

d:\scripts\sapdown.bat (run it on the media server)

After that I've tested some ways on a separate virtual machine and found out, that the following command works:

PsExec.exe \\server -u domain\SIDadm -p password "\\Server\scripts\sapdown.bat" (run it on the media server)

So I've tested this Command:

\\Server\scripts\sapdown.bat (run it on the remote server)

But it doesn't works either. So I've checked the last command:

d:\scripts\sapdown.bat (run it on the media server)

and this command works. But not on my productive backup system. I get the following error message:

Error (1314): A required privilege is not held by the client.

After that, I remebered that I've set the services to an other account then local admin. I changed all Backup Exec services back to the local admin account and now the pre and post command works fine:

d:\scripts\sapdown.bat (run it on the media server)

 

I think that the Backup Exec services had a problem after the initial installation of Backup Exec 2010 R3.

I really don't know why the command \\Server\scripts\sapdown.bat (run it on the remote server) isn't working, the job is running and completes all configured steps, but the pre and the post command were not called.

Thank you all for your help.

Best Regards,

Tobias 

View solution in original post

18 REPLIES 18

Striker_303
Level 6
Employee

Try moving batch files to C drive

Also add BE service account to security of this folder with full rights.

Check win event viewer- for any message -why could not run the batch file?

Tobias_P_
Level 4

Hi,

I tried drive C, Symantec installation path and other drives.

The event viewer is just saying, that BE cannot start the job, no more informations.

What do you mean with "BE service account", the user which runs the BE Services? That's the local administrator and the administrator has full rights on the directory where the scripts are stored.

Striker_303
Level 6
Employee

Does the backup work without selecting pre/post options?

Go to BE console -network -logon accounts -look for account which say BE System account

also make it default and add to local admin on server.

VJware
Level 6
Employee Accredited Certified

Are these pre/post commands running on the local media server or on the remote server being backed up ?

Tobias_P_
Level 4

The BE System account is already set as default and it is as default local admin.

Also I gave this account domain admin rights, restart the server and tested it again, no way.

 

These pre/post commands running a batch file on the local media server, and this batch file runs other batch files on the remote server. 

Pre <d:\scripte\server_down.bat> 

PsExec.exe \\server -u domain\SYSadm -p SYSpw "\\server\d$\Backup_Script\sapdown.bat"

When I start the batch files with the BE Service account user, outeside from BE, it runs very well. So what's the deal?

 

Thank you!

VJware
Level 6
Employee Accredited Certified

The RAWS service on both the media and the remote servers should be using the Local System Account...Does the remote server's credential account have access to the local media server ?

Ken_Putnam
Level 6

When the Pre and Post jobs run, there is no environmental variable for PATH

So you must either add a PATH statement as the first line of the CMD file that will include all the directories that contain non system commands, or you must use absolute paths for all commands

In your example try
 

 

path=c:\utils (and any other dirs referenced in sapdown.bat)

PsExec.exe \\server -u domain\SYSadm -p SYSpw \\server\d$\Backup_Script\sapdown.bat

(or whatever that path is)

or

C:\Utils\PsExec.exe \\server -u domain\SYSadm -p SYSpw \\server\d$\Backup_Script\sapdown.bat   

and also include absolute paths in the sapdown.bat file

(or whatever that path is)

Tobias_P_
Level 4

Of course I've set the PATH env var, system wide <C:\Program Files (x86)\SysinternalsSuite> and yes I've restarted the server.

The scipts, pre and post, running well when I start them with the BE system account, so why I have to set absolute paths in the batch files? There are many for loops, which searches for running services and stop them if some are running. But the error message says it cannot find the batch file itself .. or am I wrong?

 

Tobias_P_
Level 4

Both, the local and the remote service are using the Local System Account.

All remote server, system users of the remote servers, have got local admin rights and they can connect to the admin shares (c$, <drive>$).

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

1) Why don't you start with a batch/command file that contains an echo statement to a text file (with a specific path) just to confirm whether or not it is a problem inside your batch file or whether Backup Exec is not even calling the batch file

 So create a batch file in D:\script called testbat.bat

and inside the bat file just put one line

ECHO Batch file was activated by Backup Exec >d:\scripte\testoutput.txt

Then put this as a pre-command on a test backup job and run it - if the text file is created then BE is calling the batch file and at least will help you narrow down the problem.

 

2) Try running your pre command using WIndows task scheduler but set to run as SYSTEM instead of a user (as Beremote process uses Local System for credentials.)

Tobias_P_
Level 4

Hi Colin,

good point, I've tested it, but the batch file doesn't create a text file. Starting the batch as the BE Local Admin account and as local administrator, the text file will be create.

Second, the batch does not run as SYSTEM, after planning it with the task scheduler.

 

I've also tried to change the services to the local administrator (.\Administrator), restarted all services and checked the job again, but it comes the same error message.

So, is it a BE internal problem or do I have authority problem on my machine or domain. The security of the script folder is SYSTEM - FULL, Administrators - FULL 

Can you tell me, if you trying to test the simple pre command with the batch file you gave me, is it working and when it is working, what are your settings (services, BE System Account, folder settings ..)

Tank you

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

OK so I just created the same test batch file (that creates a text file) and then used Task Scheduler set to Local System to run it. In my setup this worked - so if yours does not then you may have a Local System Security Limitation.

My test was done using Windows 2008 x64 SP2

EDIT: I then used a separate media server to run a Backup Job with a pre-command for the above server and this also correctly ran my test batch fiel as a pre command.

 

Would you have any security products that might block runninng of batch/command files installed?

 

Can you monitor with filemon (or similar utility) to see if an attempt is made to open the batch/command file

 

Tobias_P_
Level 4

No no .. the test batch runs by using the task scheduler, i meant my sapdown.bat file wont work with the SYSTEM account using the task scheduler. But that is right, because the local SYSTEM account has no rights on the remote machine.

I also tried set the BE System Account (domain\backupadm) and the server account (domain\backupadm) (same account) to domain admin and changed all services to this user. But it doesn't work either.

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

OK Which server is the batch file on and which option are you selecting for where the pre command should run

 

My testing was done on remote machine with the batch file on the remote machine and the option to run the pre command on the remote machine selected

And for the test the task scheduler trigger was also configured on the remote machine.

Tobias_P_
Level 4

Thank you for your support.

before we upgrade to 2010 R3, we're using BE 2010 and in this version I used the following command for the PRE Command: \\server\d$\scripts\batch.bat in this batch file I shutdown some services with <net stop service>, and it works. So with 2010 R3, I can't do that, so I write a batch file that is on the media server and call a batch file that is on the remote server. 

I also tested your way, batch file on the remote machine, and the pre command on the remote machine. But that is not running either.

What you mean with the task scheduler trigger was configured on the remote machine?

 

Thanks

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

Ok in R3 yuou should be able to write a batch fiel that is on the remoet server and run it in the remote server as a pre- command

Which is eacatky what I did in my test.

And to run task scheduler  for testing on the remote server you go to the physical console of the server (or RDP onto it) and run Task Scheduler there. And then when yoyu caret teh taskl tio run teh batch file in task schuler - you tell it to use SYSTEM as the logon for the credential inside the task. This is just to test that the batch file can run as local system.

As you are currently trying to run a batch file on the media server to call a bath file on the remote server I am not sure this can be doen with local systsme which is probably part of your priovblem.

Why are you not using the option in the Pre command settings to run the command on the remote servers and copying the batch file to a path on the harddisk of the remote servers? Or ar you doing this and not seeing it work?

BTW I think you need to log a formal support case for someone in tech support to actually see what you are doing.

 

C.

Tobias_P_
Level 4

Ok, something new ..

I reinstalled the 2010R3 version on a virtual machine and tested it the old way, what doesn't work on my backup machine: PRE Command: <\\server\d$\scripts\batch.bat> I've tried first your test.bat which one creates a text file. And i works. So after that I tried my script that also lies on the remote server but I get an error message again. I found the following TECHNOTE: http://www.symantec.com/docs/TECH53369 - (A backup job with pre/post command fails with the error "0xe00081cf - The pre/post command has returned an error")

Sorry it's in german:

Auftrag beendet am Freitag, 9. Dezember 2011 um 17:05:06
Abschlussstatus: Fehlgeschlagen
Endgültiger Fehler: 0xe00081cf - Es wurde ein Fehler für den Vor-/Nachbearbeitungsbefehl zurückgegeben.
Endgültige Fehlerkategorie: Auftragsfehler

Zusätzliche Informationen zu diesem Fehler finden Sie unter der Verknüpfung V-79-57344-33231

Klicken Sie auf eine der unten aufgeführten Fehlermeldungen, um den Fehler im Auftragsprotokoll zu finden
Sichern- server.fqdn.de V-79-57344-33231 - Fehler bei vor oder nach Auftrag gegebenem Befehl 255

Do you know what is the last error message mean? Error during pre or post task at order 255 - hope that's the right translation. So if you don't have an other clue, I have to open a support ticket.

 

Anyway, thank you

Best Regards!

Tobias_P_
Level 4

Got it!!!

After many hours testing some ways, I've got a solution.

Settings that doesn't work:

\\Server\scripts\sapdown.bat (run it on the remote server)

PsExec.exe \\server -u domain\SIDadm -p password "\\Server\scripts\sapdown.bat" (run it on the media server)

d:\scripts\sapdown.bat (run it on the media server)

After that I've tested some ways on a separate virtual machine and found out, that the following command works:

PsExec.exe \\server -u domain\SIDadm -p password "\\Server\scripts\sapdown.bat" (run it on the media server)

So I've tested this Command:

\\Server\scripts\sapdown.bat (run it on the remote server)

But it doesn't works either. So I've checked the last command:

d:\scripts\sapdown.bat (run it on the media server)

and this command works. But not on my productive backup system. I get the following error message:

Error (1314): A required privilege is not held by the client.

After that, I remebered that I've set the services to an other account then local admin. I changed all Backup Exec services back to the local admin account and now the pre and post command works fine:

d:\scripts\sapdown.bat (run it on the media server)

 

I think that the Backup Exec services had a problem after the initial installation of Backup Exec 2010 R3.

I really don't know why the command \\Server\scripts\sapdown.bat (run it on the remote server) isn't working, the job is running and completes all configured steps, but the pre and the post command were not called.

Thank you all for your help.

Best Regards,

Tobias