ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQSIBACKUPBROKER FAILS WITH CRONTAB

Post new topic  Reply to topic
 MQSIBACKUPBROKER FAILS WITH CRONTAB « View previous topic :: View next topic » 
Author Message
Robmar_VE
PostPosted: Thu Jun 22, 2017 6:22 am    Post subject: MQSIBACKUPBROKER FAILS WITH CRONTAB Reply with quote

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
View user's profile Send private message
joebuckeye
PostPosted: Thu Jun 22, 2017 6:40 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 364
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
View user's profile Send private message
Vitor
PostPosted: Thu Jun 22, 2017 6:41 am    Post subject: Re: MQSIBACKUPBROKER FAILS WITH CRONTAB Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQSIBACKUPBROKER FAILS WITH CRONTAB
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.