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 » General IBM MQ Support » Help with backup procedure script

Post new topic  Reply to topic
 Help with backup procedure script « View previous topic :: View next topic » 
Author Message
Boomn4x4
PostPosted: Thu Jun 07, 2012 10:25 am    Post subject: Help with backup procedure script Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

I have a script that creates a QMGR on a primary box and starts it, then using the same command creates a QMGR on a secondary box and starts it for replay.

I then shutdown the primary QMGR, tar up the log and qmgrs directories and send them to the secondary box and extract them. Then start the secondary for replay, then start the primary backup.

This works fine the first time.

I then have another script on the primary (a script I got as a support pack) that advances the logs and archives unneeded files to a shared file system. I have another script on the secondary system that gets any log files in that directory and copies them over to its log/QMGR/active directory. Then it replays the logs.... however, it says log not available.

The secondary system says it needs S000000.LOG... and its there, but it is failing to load it.

If I manually shutdown the primary, copy the log and qmgrs directorys over to the seconday and start up the secondary for replay, it works fine. After I do this, I can then run the two scripts over and over again w/o problem.... It just seems to be the first time.

What am I missing?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 07, 2012 10:52 am    Post subject: Reply with quote

Grand High Poobah

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

permissions on the log files on first automatic copy? Permissions and ownership...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Boomn4x4
PostPosted: Fri Jun 08, 2012 4:03 am    Post subject: Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

fjb_saper wrote:
permissions on the log files on first automatic copy? Permissions and ownership...


It was some kind of permissions and/or ownership issue... but I don't understand how to see it.

What I figured out is that my scripts creates the qmgrs and starts them as user mqm.... however, my script then replayed them on the secondary system as root. All of the files appeared to be owned correctly as the tar preserved all ownerships and permissions.

Once I changed the replay to be executed by mqm, the problem went away.

Can someone explain why this is happening. Root is in the mqm group and has control over mqm... why would replaying the logs as root cause this kind of problem?
Back to top
View user's profile Send private message
exerk
PostPosted: Fri Jun 08, 2012 4:50 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Boomn4x4 wrote:
...Root is in the mqm group and has control over mqm...

It shouldn't be, and shouldn't have.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 08, 2012 4:59 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

exerk wrote:
Boomn4x4 wrote:
...Root is in the mqm group and has control over mqm...

It shouldn't be, and shouldn't have.


. There's no reason to put root in the mqm group. Root can, and should, always su or sudo to mqm to perform any MQ administrative functions. That's the whole point of the mqm user. Or if one wishes to view the mqm user as strictly an application service id, then one should create an mqadmin user that is a member of mqm and do all mq work that way. but, again, root should not be used for any mq administrative work.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jun 08, 2012 5:04 am    Post subject: Reply with quote

Grand High Poobah

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

Boomn4x4 wrote:
Can someone explain why this is happening. Root is in the mqm group and has control over mqm... why would replaying the logs as root cause this kind of problem?


Because mqm holds a special place in WMQ's panethon, and root holds a special place in Unix's parade of the worthy. You don't mention which Unix you're using, but performing system level activities on WMQ as a user other than mqm is not what the software is expecting and you get this kind of effect. If you must run as root, su to mqm first.

This is also why, in my experience, root is not added to application groups. If a root user needs control over an application, it's better for root to become the service id of that application.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Boomn4x4
PostPosted: Fri Jun 08, 2012 7:35 am    Post subject: Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

Glad this was caught early. Thanks guys.
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 » General IBM MQ Support » Help with backup procedure 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.