Forum Discussion

RCMORE's avatar
RCMORE
Level 3
15 years ago

Pre and post Batch files do not work when job runs

Hello.  I have an issue where I am trying to backup and Oracle database on a different server.  The oracle client has been installed on the BackupExec server so it can connect to the Oracle databas...
  • MitchR's avatar
    15 years ago

    In general for scheduled tasks, if you're only accessing things on the local computer, "Local system" is probably good enough.  If you're doing anything over the network, you'll need a Domain Account.  Within BackupExec, these pre & post tasks are going to be using whatever account the BackupExec services use on the BE server - which is almost certanly a Domain Admin if you're setup correctly. 

    When in doubt, from the Tools menu, select Backup Exec Services, then click on Services credentials.  Use this to change the services to use whatever account you're using for Backup Exec.  If that account is missing some rights, this process will (usually) clean that up.

    I'd recommend trying this:
    -On the BE server, make a directory  C:\TestBE
    -Assign the "Everyone" group "Full" rights to that directory.
    -Make a batch file called "C:\TestBE\PreTest.bat", with the following contents
              ECHO Pre Command works OK>C:\TestBE\Pre-OK.txt
    -Make a batch file called "C:\TestBE\PostTest.bat", with the collowing contents
              ECHO Post Commans works OK>C:\TestBE\Post-OK.txt
    -Make a test backup job (something small), and assign the above two as Pre & Post tasks.
    -Run that test job

    If this works, then BE is working OK. Your problem is either rights, or a problem with your script.

    If there's any way to log the output of your pre & post files (such as pipeing the output with ">"), you should get a better idea of what's going on.  Troubleshooting blindly can be a real pain!