Author |
Message
|
guest468 |
Posted: Mon Jun 01, 2009 8:42 am Post subject: Recovering messages after loss of log files |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Jun 01, 2009 8:53 am Post subject: Re: Recovering messages after loss of log files |
|
|
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 |
|
 |
guest468 |
Posted: Mon Jun 01, 2009 9:59 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Mon Jun 01, 2009 11:55 am Post subject: |
|
|
 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 |
|
 |
guest468 |
Posted: Mon Jun 01, 2009 12:31 pm Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Jun 01, 2009 12:46 pm Post subject: |
|
|
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 |
|
 |
aditya.aggarwal |
Posted: Tue Jun 02, 2009 10:17 pm Post subject: |
|
|
 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 |
|
 |
guest468 |
Posted: Thu Jun 04, 2009 12:02 pm Post subject: |
|
|
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 |
|
 |
gbaddeley |
Posted: Thu Jun 04, 2009 4:24 pm Post subject: |
|
|
 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 |
|
 |
shashivarungupta |
Posted: Sun Jun 07, 2009 10:46 pm Post subject: Re: Recovering messages after loss of log files |
|
|
 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 |
|
 |
|