Video Screencast Help

Pre-command not executed by Linux agent

Created: 13 Sep 2012 | 6 comments

The credentials used by the media server are for the Linux root account.

The pre-command is the fully qualified script name, and "on each server backed up."

The script permissions are 774.

The problem is the script does not execute on the Linux server.

Comments 6 CommentsJump to latest comment

pkh's picture

What exactly did you put in the pre-command?  Did you put something like "sh /usr/bin/ScriptA" in the pre-command field?

Rick.DeBay's picture

I tried both:

/bin/sh /usr/backup/bin/


Is there any log on the media server that would show that it attempted to run the script and what the response from the agent was?  Same for the agent side?

pkh's picture

There should be a line in the joblog which indicate that the pre-command is being executed.  You can also use this procedure to see whether your pre-command is invoked.

You should also log on to the Linux server with the credentials used by BE and then execute the exact command that you are going to use as a pre-command.  This test must succeed before you can use the command as a pre-command.

Rick.DeBay's picture

Job properties:

Pre/Post Commands

Pre-command: /usr/backup/bin/
Run these commands: On each server backed up
Cancel command if not completed within: 150 minutes

Allow pre- and post-commands to be successful only if completed with a return code of zero: No
Run job only if pre-command is successful: No

The command does not appear in the job log.

I ran using the debugger, and instead of taking a few minutes (there is nothing to backup since the pre-command didn't create the backup) it takes dozens of minutes spending most of its time doing "database grooming."

Does anyone have a debug log that shows what a successful pre-command on the remote server looks like?

pkh's picture

You will just get a one-liner like this

I don't think "/usr/backup/bin/" will work.  If you try to execute this command on the Linux machine you will get an error, you need something like

sh /usr/backup/bin/

Rick.DeBay's picture

As I originall posted, I tried both the script name and explicitly calling /bin/sh.  The script file permission is marked as executable.

Also, it doesn't show up in the job log.  What I was asking for was what does it look like in the debug log.  The debug log only shows that the pre command is part of the job properties.  It doesn't show that it ever actually tries to execute the command.