cancel
Showing results for 
Search instead for 
Did you mean: 

Pre-command not executed by Linux agent

Rick_DeBay
Level 5

http://www.symantec.com/docs/TECH19151

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.

6 REPLIES 6

pkh
Moderator
Moderator
   VIP    Certified

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
Level 5

I tried both:

/bin/sh /usr/backup/bin/database_backup_important.sh

/usr/backup/bin/database_backup_important.sh

 

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
Moderator
Moderator
   VIP    Certified

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.

https://www-secure.symantec.com/connect/forums/post-job-failing-backup-exec-2010#comment-7690331

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
Level 5

Job properties:

Pre/Post Commands

Pre-command: /usr/backup/bin/database_backup_important.sh
Post-command:   
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
Moderator
Moderator
   VIP    Certified

You will just get a one-liner like this

I don't think "/usr/backup/bin/database_backup_important.sh" 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/database_backup_important.sh

Rick_DeBay
Level 5

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.