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 » Recovering messages after loss of log files

Post new topic  Reply to topic
 Recovering messages after loss of log files « View previous topic :: View next topic » 
Author Message
guest468
PostPosted: Mon Jun 01, 2009 8:42 am    Post subject: Recovering messages after loss of log files Reply with quote

Centurion

Joined: 30 May 2006
Posts: 146
Location: NY

Hi
Recently someone in unix admin team deleted many of the MQ active log files. Apparently the guy thought they are no longer being used since the timestamp was very old . I had to recover the qmgr by creating a dummy qmgr and copy the logs from there. But this technique doesn't recover the messages (esp persistent) sitting in the queue. And since the messages are always stored in the queue file, just wondering if they can recovered in some way in this kind of scenarios?
The qmgr is using circular logging.

Thanks
Dave.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 01, 2009 8:53 am    Post subject: Re: Recovering messages after loss of log files Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

guest46,8 wrote:
just wondering if they can recovered in some way in this kind of scenarios?

Yes, if you're using linear logging.
guest46,8 wrote:
The qmgr is using circular logging.

No, only linear logging gives you message recovery.

But messages sitting in q files are not lost if you lose log files. So... what did you lose?
Back to top
View user's profile Send private message
guest468
PostPosted: Mon Jun 01, 2009 9:59 am    Post subject: Reply with quote

Centurion

Joined: 30 May 2006
Posts: 146
Location: NY

mqjeff wrote:
But messages sitting in q files are not lost if you lose log files. So... what did you lose?

Jeff, alls the messages were lost when I recovered the qmgr.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Jun 01, 2009 11:55 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

If the messages were persistent, they were logged. If you delete the logs, they can not be recovered.

If the messages were consumed, they are no longer in the queues. This means that they do not need to be recovered.

Quote:
Jeff, alls the messages were lost when I recovered the qmgr.

Exactly how did you recover the qmgr?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
guest468
PostPosted: Mon Jun 01, 2009 12:31 pm    Post subject: Reply with quote

Centurion

Joined: 30 May 2006
Posts: 146
Location: NY

I created a dummy qmgr with the same config. Replaced the entire active folder of existing qmgr with the dummy one. (along with the log control file)
Restarted the qmgr
A Couple of queues had thousands of persistent messages which were all lost upon restart of the qmgr.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 01, 2009 12:46 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you replaced the *q* files, as opposed to just the *log* files, then you yourself deleted the messages.
Back to top
View user's profile Send private message
aditya.aggarwal
PostPosted: Tue Jun 02, 2009 10:17 pm    Post subject: Reply with quote

Master

Joined: 13 Jan 2009
Posts: 252

What was the status of the message in queue i.e whether the message were in commited or uncommited state in the queue? [/code]
Back to top
View user's profile Send private message
guest468
PostPosted: Thu Jun 04, 2009 12:02 pm    Post subject: Reply with quote

Centurion

Joined: 30 May 2006
Posts: 146
Location: NY

Sorry guys, i did a test now and all the persistent messages were recovered successfully.
May be earlier the queue file was also deleted by unix admins since I guess that must have been of size about 2GB. Unfortunately I didn't check that before recovering the qmgr, so will never know.
Thanks.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Jun 04, 2009 4:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

I have been the unfortunate victim of sys admins deleting MQ circular log files because they thought a very old last-access date meant they were no longer required. A queue manager will not start with missing circular log files!

The solution is better education (sys admins to never delete files in /var/mqm without confirming with MQ support) and set up monitoring alerts on /var/mqm file system filling up so that action can be taken before it becomes totally full.
_________________
Glenn
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Sun Jun 07, 2009 10:46 pm    Post subject: Re: Recovering messages after loss of log files Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

guest468 wrote:
Hi
Recently someone in unix admin team deleted many of the MQ active log files. Apparently the guy thought they are no longer being used since the timestamp was very old . I had to recover the qmgr by creating a dummy qmgr and copy the logs from there. But this technique doesn't recover the messages (esp persistent) sitting in the queue. And since the messages are always stored in the queue file, just wondering if they can recovered in some way in this kind of scenarios?
The qmgr is using circular logging.

Thanks
Dave.


IBM Paper on huge discussion on logging facility in MQ. Which one to use and which one to not based on the admin. requirement(s)
http://www.ibm.com/developerworks/websphere/techjournal/0904_mismes/0904_mismes.html

Replacing the all Queue files with dummy one, will cause problems.
I agree with mqjeff on that.


_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Recovering messages after loss of log files
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.