Author |
Message
|
CriticalDeadline |
Posted: Tue Apr 26, 2016 12:53 pm Post subject: Restoring MQ data from system disk backup |
|
|
Novice
Joined: 15 Sep 2014 Posts: 10
|
Hi,
I was asked to delete a certain range of messages and in my haste I accidentally deleted all messages in a particular queue.
The messages that were to be deleted were all written recently - in the last few hours.
The messages that should not have been deleted were all from 2+ weeks ago.
I checked with our sysadmin and found that a full system backup is made occasionally - so I pulled the file:
/var/mqm/qmgrs/QMGRNAME/queues/THE!QUEUE!IN!QUESTION
It's a large file - around 100MB. It seems to have the data the user is looking for. Is there any way to get the data back to the queue? I tried a simple test in overwriting the backup file to sandbox system but it didn't seem like any messages were written to the destination queue - started at 0 msgs and after writing that 100MB file to the destination it still shows 0 msgs.
Thanks for any pointers! |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Apr 26, 2016 6:44 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Restore the complete full system backup to a spare LPAR or server.
Use a utility to unload messages in the queue to a file. Use the same utility to load the messages back into the queue. _________________ 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 |
|
 |
CriticalDeadline |
Posted: Wed Apr 27, 2016 5:47 am Post subject: |
|
|
Novice
Joined: 15 Sep 2014 Posts: 10
|
Thanks - how can we restore a clustered qmgr and connect to it without causing conflicts with existing, same-named qmgrs on the network? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 27, 2016 5:59 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
CriticalDeadline wrote: |
Thanks - how can we restore a clustered qmgr and connect to it without causing conflicts with existing, same-named qmgrs on the network? |
Don't let it access the network. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
rammer |
Posted: Wed Apr 27, 2016 10:53 am Post subject: |
|
|
Partisan
Joined: 02 May 2002 Posts: 359 Location: England
|
mqjeff wrote: |
CriticalDeadline wrote: |
Thanks - how can we restore a clustered qmgr and connect to it without causing conflicts with existing, same-named qmgrs on the network? |
Don't let it access the network. |
I think strmqm -ns would work in that circumstance. cant remember exactly off my head what it doesn't start but I think it includes the listener and channel imitator. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Apr 27, 2016 11:58 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Unplugging the Cat5 cable seems a plausible solution, unless your servers are wifi enabled. _________________ 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 |
|
 |
CriticalDeadline |
Posted: Thu Apr 28, 2016 10:27 am Post subject: |
|
|
Novice
Joined: 15 Sep 2014 Posts: 10
|
I opened a PMR on the hope that IBM would have an easier way to recover messages from the backup file that I have. This was their response:
Code: |
The following can be done to restore the backup:
.
1) Make a local copy of the backup file that you have:
/var/mqm/qmgrs/QMGRNAME/queues/THE!QUEUE!IN!QUESTION
2) Stop the queue manager
3) Replace the current file that is currently in the queue manager data
with the local copy of the backup file
4) Restart the queue manager
.
Thank you.
MQ Support |
Needless to say, I had already tried that. Tried it again and it didn't work. Odd that IBM would suggest something like this, isn't it? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Apr 28, 2016 11:15 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
CriticalDeadline wrote: |
Odd that IBM would suggest something like this, isn't it? |
I'd have been surprised if that worked for you?
What have you tried since you last posted? Did you try to restore the whole file system on a spare box? That seemed to me to be a simple solution.
Is this a "CriticalDeadline" problem? _________________ 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 |
|
 |
CriticalDeadline |
Posted: Fri Apr 29, 2016 5:28 am Post subject: |
|
|
Novice
Joined: 15 Sep 2014 Posts: 10
|
I haven't tried restoring the whole file system yet - for a few reasons that's a bit of a heavy lift in my environment. If there's no good alternative solutions I'll get there.
It's as much a "bruce" problem as it is a "CritcalDeadline" problem. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 29, 2016 5:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I believe our esteemed prime sponsor, backer and site maintainer Cressida's ReQuest product will let you replay messages from a point in time.
Some dependencies on how you have your logs set up. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Andyh |
Posted: Fri Apr 29, 2016 9:25 am Post subject: |
|
|
Master
Joined: 29 Jul 2010 Posts: 239
|
Was the queue manager running when the file system backup was taken ?
When the queue manager is running then a bunch of stuff will be cached in memory, and thus not current on disk.
Restoring a single file in isolation does nothing to sync up the queue file with the recovery logs and so is only likely to be a success if the queue manager had been shutdown (in a controlled fashion) prior to taking the backup. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Apr 30, 2016 11:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Which means that if your messages did not enjoy some kind of persistence, their gone forever!!!!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|