|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQSIBACKUPBROKER FAILS WITH CRONTAB |
« View previous topic :: View next topic » |
Author |
Message
|
Robmar_VE |
Posted: Thu Jun 22, 2017 6:22 am Post subject: MQSIBACKUPBROKER FAILS WITH CRONTAB |
|
|
Newbie
Joined: 14 Jun 2017 Posts: 8
|
Hello everyone.
A pleasure to greet them, I am trying to automatically schedule the broker backup with the crontab and when running the .sh file it generates an error and the backup file is not generated.
The .sh file contains the following statements:
#! / Bin / bash
# - * - ENCODING: UTF-8 - * -
Mqsibackupbroker BRK8FENUND -d / home / mqsiuser / PBACKUP -v /home/mqsiuser/PBACKUP/trace.log
Exit
The error message in the crontab is as follows:
/home/mqsiuser/scripts/BackupBroker.sh: line 3: mqsibackupbroker: command not found
PD: When executed in .sh file manually if it generates the backup file.
I appreciate your help, if there is any error in the script or if you know another way to automate backups of the broker.
Thank you.- |
|
Back to top |
|
 |
joebuckeye |
Posted: Thu Jun 22, 2017 6:40 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
crontab does not load a user profile automatically.
You will either need to write a script that loads the mqsiprofile and then calls mqsibackupbroker or source the user's profile at the start of your cron entry.
This is what we do for cron entry's that require a profile be run.
Code: |
* * * * * . ~/.profile > /dev/null; do actual command here
|
|
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 22, 2017 6:41 am Post subject: Re: MQSIBACKUPBROKER FAILS WITH CRONTAB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Robmar_VE wrote: |
if there is any error in the script |
Not in the script but in how you're running it. When you run it manually, I would imagine the user in question has mqsiprofile dotted. From the error you post, I imagine the user invoked running the cron does not.
You either need to run the script with a properly configured user, or dot the mqsiprofile in your script. If it was me, I'd do the latter as I consider that easier. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|