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 » Configmanager backup script

Post new topic  Reply to topic
 Configmanager backup script « View previous topic :: View next topic » 
Author Message
rkuma2
PostPosted: Tue Dec 30, 2008 4:31 pm    Post subject: Configmanager backup script Reply with quote

Novice

Joined: 11 Jan 2008
Posts: 20

Hi All,

I took the backup of the configuration manger manually by using these following commands on AIX


mqsistopconfigmgr <configmgr_name>

mqsibackupconfigmgr <configmgr_name> -d<backupdirectoryname> -a <archive file name>

mqsistart configmgr <configmgr_name>


I need the entire process above in a shell script to take configuration manager backup automatically to run on AIX server.

I have to run this script weekly once using a crontab.

Does any one has the configuration manager backup shell script?

Please help me ASAP

Thanks in advance

Rkumar
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 30, 2008 8:40 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Talk to your Unix admin.
You will need to take particular care about the environment and might want to / need to source the mqsiconfig script first. Make sure to redirect error and output into a file you can check for results ... although I believe cron puts the sysout and syserr to a mail message being sent to the user executing the cron...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rkuma2
PostPosted: Tue Jan 13, 2009 4:45 pm    Post subject: Configmgrbackupscript Reply with quote

Novice

Joined: 11 Jan 2008
Posts: 20

i have executed the following script it runs ok.

#!/bin/ksh

# Set HOSTNAME
HOSTNAME=`hostname`

# Set DATE
DATE=`date +%F-%H%M%S`

# Set the home directory for the backup files
MQBACKUP=/var/mqm/admin/backups/wmbconfigmgr

# Set the home directory for the log files
MQ_ADMIN_LOG=/var/mqm/admin/logs

# Get the Configuration Manager
find /var/mqsi/components -name BERNARD -print | cut -f 5 -d "/" > /tmp/configmgr$$
cat /tmp/configmgr$$ |

while read CONFIGMGR_NAME
do


#Check to see if the Configuration Manager is running.
NUM_PCS=`ps -ef | grep bip | grep $CONFIGMGR_NAME | wc -l`


#If the Configuration Manager is running stop.
if [ "$NUM_PCS" -gt 0 ]
then

/usr/opt/IBM/mqsi/6.0/bin/mqsistop $CONFIGMGR_NAME

sleep 10

#Check to see if the command executed successfully
NUM_PCS=`ps -ef | grep bip | grep $CONFIGMGR_NAME | wc -l`

#If the Configuration Manager is still running, send a page and exit
if [ "$NUM_PCS" -ne 0 ] ; then
echo "ERROR: $CONFIGMGR_NAME on $HOSTNAME did not stop!"

fi

fi

#Perform Backup
echo "Performing Configuration Manager Backup $CONFIGMGR_NAME on --> $HOSTNAME"

/usr/opt/IBM/mqsi/6.0/bin/mqsibackupconfigmgr $CONFIGMGR_NAME -d $MQBACKUP

if [ "$?" -ne 0 ]
then
echo "Configmgr Backup Failed --> $CONFIGMGR_NAME Backup Failed on $HOSTNAME "

fi

# Start the Configuration Manager.

echo "Starting the configuration manager $CONFIGMGR_NAME on $HOSTNAME"
/usr/opt/IBM/mqsi/6.0/bin/mqsistart $CONFIGMGR_NAME

sleep 20

# Check to see if the command executed successfully
NUM_PCS=`ps -ef | grep bip | grep $CONFIGMGR_NAME | wc -l`


#If the Configuration Manager is not running, send a page and exit
if [ "$NUM_PCS" -eq 0 ]
then
echo "ERROR: $CONFIGMGR_NAME on $HOSTNAME did not start!"

fi
done

rm /tmp/configmgr$$



but when i run this script in cron tab i got this following error


/usr/opt/IBM/mqsi/6.0/bin/mqsistop[27]: mqsistop.bin: not found.

Please respond ASAp

Thanks
RK
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 14, 2009 12:55 am    Post subject: Re: Configmgrbackupscript Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rkuma2 wrote:
but when i run this script in cron tab i got this following error


/usr/opt/IBM/mqsi/6.0/bin/mqsistop[27]: mqsistop.bin: not found.


PATH isn't set up correctly (obviously!), I imagine mqsiprofile isn't sourced properly or at all in the running context.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 14, 2009 3:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

fjb_saper wrote:
Talk to your Unix admin.
You will need to take particular care about the environment and might want to / need to source the mqsiconfig script first. Make sure to redirect error and output into a file you can check for results ... although I believe cron puts the sysout and syserr to a mail message being sent to the user executing the cron...

Have fun

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Jan 15, 2009 1:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

fjb_saper wrote:
fjb_saper wrote:
Talk to your Unix admin.
You will need to take particular care about the environment and might want to / need to source the mqsiconfig script first.




Missed that - should have just referred to your post!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rkuma2
PostPosted: Mon Jan 19, 2009 4:51 pm    Post subject: Configmanager backup script Reply with quote

Novice

Joined: 11 Jan 2008
Posts: 20

Hi All,


i have set up the PATH correctly and sourced the mqsi profile it is working now.

Thanks
RK
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 » Configmanager backup script
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.