Author |
Message
|
yortch |
Posted: Tue Mar 13, 2007 9:43 am Post subject: Hot backup possible using rcdmqimg on MQ 6? |
|
|
Apprentice
Joined: 30 Aug 2004 Posts: 34
|
I'd like to know if it is possible to back up a queue manager without stopping it on MQ 6. The queue manager is using linear logging and I will be using the rcdmqimg (record media image) command to back it up. The "System Administration Guide Version 6.0" indicates that this command can be run on an active queue manager:
"You use this command with an active queue manager. Further activity on the queue manager is logged so that, although the image becomes out of date, the log records reflect any changes to the object."
However this same document indicates that the queue manager must not be running when taking a backup:
"Ensure that the queue manager is not running. If you try to take a backup of a running queue manager, the backup might not be consistent because of updates in progress when the files were copied."
On the second paragraph, the backup is done by merely copying the data and log files, so it makes sense to have to stop the queue manager. If the backup is taken using the rcdmqimg command it sounds like a hot backup is possible. Another question is wether using rcdmqimg is sufficient to backup and restore an entire queue manager (i.e. can I achieve the same as if I were copying the data/log files)?
Any insight into this is appreciated. |
|
Back to top |
|
 |
Michael Dag |
Posted: Tue Mar 13, 2007 10:47 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
rcdmqimg itself does not backup MQ.
it writes the necessary info for recovery to the latest log file.
if you start with a linear logging qmgr the oldest file for media recover is S0000000.
if you never run rcdmqimg it will remain S0000000 _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 13, 2007 1:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Michael Dag wrote: |
if you start with a linear logging qmgr the oldest file for media recover is S0000000.
if you never run rcdmqimg it will remain S0000000 |
Not quite true. It will remain S0000000.LOG until the next checkpoint is being written by the qmgr and that next checkpoint is written to a different logfile.
So if you have very little activity you don't get to move off the starting log. However if your activity is huge the qmgr will write checkpoints about every 10,000 messages (persistent logged messages) and you will notice the checkpoint changing.... Typically once a day around midnight it will write another checkpoint ...
Anyway it is a safe thing to run rcdmqimg at least once a day...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
yortch |
Posted: Wed Mar 14, 2007 8:40 am Post subject: Hot backup feasible on MQ at all? |
|
|
Apprentice
Joined: 30 Aug 2004 Posts: 34
|
Thanks for the input. I guess what I'd like to find out is if I can't afford to take a queue manager offline, and I also need to be able to back it up for recovery purposes, is there a way to achieve this on MQ?
What happens if I back up the data/log files while the queue manager is running? Can I still recover up to the latest checkpoint on the log files? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 14, 2007 8:45 am Post subject: Re: Hot backup feasible on MQ at all? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yortch wrote: |
What happens if I back up the data/log files while the queue manager is running? Can I still recover up to the latest checkpoint on the log files? |
The files will be inconsistent and restore will not be possible.
rcdmqimg only records an image of the queue manager object. On recovery the queue manager will still require 1-n of the linear log files to roll itself forward. Which ones are required will be mentioned in the queue manager logs files; there's a support pack that not only explains this but talks out automating the removal of log files no longer require for recovery. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 14, 2007 8:47 am Post subject: Re: Hot backup feasible on MQ at all? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yortch wrote: |
is there a way to achieve this on MQ?
|
But....
It is possible under v6 to define a backup queue manager to a running one. Not used it myself but seen it in the manual and it might be closer to what you need - an MQ supplied hot standby as I understand it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Mar 14, 2007 8:48 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
if you can't afford to take the queuemanager offline, then use rcdmqimg a short time before running the backup. but beware your backup may not be reliable (i have found out the hardway in the past...)
while taking a backup of the files and the queuemanager running files can be locked and maybe skipped by your backup software...
to minimise the downtime:
to reduce stop and start time of your queuemanager you can also use rcdmqimg as there is less to recover/check to when restarting the queue manager.
if there is a business requirement for full 24x7... then look for a failover scenario... depending on the platform you are on... _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Mar 14, 2007 8:49 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 14, 2007 8:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Michael Dag wrote: |
if there is a business requirement for full 24x7... then look for a failover scenario... depending on the platform you are on... |
For this requirement I'd certainly be looking for a proper HA solution. Not sure about this new-fangled v6 backup queue manager stuff!!
For the record, the new-fangled v6 backup queue manager stuff is described in the System Admin manual in Chapter 14 - Recovery and Restart. In the section titled "Using a backup queue manager" logically enough...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Mar 14, 2007 9:18 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Vitor wrote: |
For the record, the new-fangled v6 backup queue manager stuff is described in the System Admin manual in Chapter 14 - Recovery and Restart. In the section titled "Using a backup queue manager" logically enough...  |
You mean to say the section isn't called "Using the new-fangled v6 backup queue manager stuff" ?  |
|
Back to top |
|
 |
yortch |
Posted: Wed Mar 14, 2007 10:15 am Post subject: Backup queue Manager setup |
|
|
Apprentice
Joined: 30 Aug 2004 Posts: 34
|
It seems like the "Backup queue manager" may work for us. However the instructions in the System Administration Guide seem a bit incomplete. Are there any other resources (redpaper, supporPAC) available with more info regarding this feature?
Regarding "Creating a backup queue manager"... the instructions specify that the backup QM should be created using the crtmqm command specifying the same attributes (including the same queue manager name) - attempting to do that will return AMQ8110: QM already exists.
Additionally step 3 (overwrite the backup queue manager's data and log files folder) imply that the backup QM should be created on a separate data/log folder - I know it is possible to specify a differe log path upon creation, but is it possible to specify a different data folder (assuming the backup QM can actually have the same name)?
Regarding "Updating a backup queue manager"... the instructions indicate to "copy all log extents that have been commited since the last update" - how can I tell which logs have been commited either manually or programmatically?
I'd appreciate it if anybody can shed some light regarding these questions. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Mar 15, 2007 12:45 am Post subject: Re: Backup queue Manager setup |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yortch wrote: |
Regarding "Creating a backup queue manager"... the instructions specify that the backup QM should be created using the crtmqm command specifying the same attributes (including the same queue manager name) - attempting to do that will return AMQ8110: QM already exists. |
If you're worried about hardware failure why are you defining it on the same box?
yortch wrote: |
Regarding "Updating a backup queue manager"... the instructions indicate to "copy all log extents that have been commited since the last update" - how can I tell which logs have been commited either manually or programmatically? |
This information is written to the queue manager logs with a distinctive message number. There's a support pack which talks about this. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yortch |
Posted: Thu Mar 15, 2007 4:37 am Post subject: Re: Backup queue Manager setup |
|
|
Apprentice
Joined: 30 Aug 2004 Posts: 34
|
Vitor wrote: |
If you're worried about hardware failure why are you defining it on the same box? |
I guess this is an implicit requirement ...I was considering this as a workaround for doing a hot backup. The System Administration guide specifies that "The existing queue manager does not need to be stopped for log files to be copied". So I would create a backup queue manager, update it and back it up to tape periodically. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Mar 15, 2007 4:41 am Post subject: Re: Backup queue Manager setup |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yortch wrote: |
The System Administration guide specifies that "The existing queue manager does not need to be stopped for log files to be copied". |
What it actually says is:
Quote: |
The existing queue manager does not need to be stopped for log files to be copied, however you should only copy a log file if the queue manager has finished writing to it. |
Don't forget about the bit after the "however". Consult the support pack for details. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yortch |
Posted: Thu Mar 15, 2007 5:53 am Post subject: Re: Backup queue Manager setup |
|
|
Apprentice
Joined: 30 Aug 2004 Posts: 34
|
Vitor wrote: |
Don't forget about the bit after the "however". Consult the support pack for details. |
Assuming it is acceptable to lose that bit... could I achieve the same goal backing up the "inactive logs" of the active queue manager without even using the "backup queue manager" feature?
I'm unsure which support pack documents which log files the queue manager has finished writing to. I'm only familiar with MS62 - linear log clean-up script, which can tell which log files are safe to delete/archive because they're no longer required for media/restart recovery. It seems I'll need to copy from the oldest log file for media recovery up to the most recent log file that MQ is finished writing to... is there a different support pac that I can use to figure out the most recent log file MQ is finished writing to? |
|
Back to top |
|
 |
|