mqbackup: back up queue manager

Back up a queue manager.

Purpose

You can use the mqbackup command to back up a queue manager, including all its log files and data. The command creates an archive and writes it to a location in the appliance file store. You must run the createbackupfs command to assign space for them, before you run the mqbackup command.

You can use the mqbackup command when a queue manager is stopped, or when it is running. If you are backing up so that you can use an archive file to migrate the queue manager, or if you want to be able to restore a queue manager to the state it was in at a particular time, then you should stop the queue manager before you back it up. Taking a back up of a running queue manager requires more free disk space than backing up a stopped queue manager, see Usage notes.

If the queue manager is running when you issue the mqbackup command, a warning message is displayed.

Note:
  1. If you create a back up for a queue manager with an encrypted file system, but the space that you allocated for back up using createbackupfs is not encrypted, you are prompted to confirm that this is your intended action. If the space allocated is not encrypted, then the data is unprotected while on the appliance disk.
  2. Backup files are not encrypted if copied to a remote system unless that system uses its own form of disk encryption, or equivalent.
  3. You should take appropriate security precautions when handling the backup files.

Syntax

Read syntax diagramSkip visual syntax diagram mqbackup  -m QMgrName  -o outfile

Parameters

-m QMgrName
Specifies the name of the queue manager that you want to back up.
This parameter is required.
-o outfile
Optionally specifies the name of the back up file. If no name is specified, the filename QMgrName.bak is used. If the file already exists, no back up is made and an error is reported.

Usage notes

  • This command must be run from the IBM® MQ administration mode. If the system is in the IBM MQ administration mode the prompt includes mqa(mqcli)#. To enter the IBM MQ administration mode, enter mqcli on the command line. To exit the IBM MQ administration mode, enter exit on the command line.
  • You can back up a queue manager while it is running, but this requires sufficient unallocated space on the disk to contain a temporary snapshot of the queue manager. Because of the extra space requirement it is possible that you might be told there is insufficient space for a back up. This space is not required if the queue manager is stopped before the back up is taken.
  • If a queue manager is stopped before taking a back up, it is locked for the duration of the back up and cannot be started, deleted or otherwise changed while the back up is running.
  • The back up can take some time to run, during which period your CLI session will be suspended. Interrupting the CLI session will terminate the backup process.
  • You can run the back up command on the primary instance of a queue manager on the main appliance in a disaster recovery configuration, or on the secondary instance on the recovery appliance. However, if synchronization is in progress when you try to back up a secondary instance, or if the data has become inconsistent on the secondary instance, the back up will fail.

Examples

  • The following command backs up the queue manager QM1 to the file safeandsound.bak.
    mqbackup -m QM1 -o safeandsound.bak

Related commands