Restoring a queue manager

You can use the command line to restore a queue manager from an archive file that was created when you backed up the queue manager.

Before you begin

Ensure that the archive file for the queue manager that you want to restore is located in the mqbackup:///QMgrs directory on the appliance.

About this task

You use the mqrestore command to restore a queue manager, including all its log files and data, from a previously taken backup. The command cannot run if there is already a queue manager with the same name on the appliance. The archive file must be located in the backupfs location, mqbackup:///QMgrs.

You can specify that the file system that you restore the queue manager to is encrypted. You do this when restoring an already-encrypted queue manager, but you can also do this to create an encrypted file system for a previously unencrypted queue manager.

You can only restore one queue manager at a time.

Note: A backup of a high availability (HA) queue manager does not contain any HA configuration data, so if you restore the queue manager from a backup file it is restored as a stand-alone queue manager. Similarly, disaster recovery (DR) configuration data is not preserved when you back up a DR queue manager. See Adding an existing queue manager to a high availability group and Configuring disaster recovery for queue managers for help with restoring your configuration.

Procedure

  1. Connect to the IBM MQ Appliance as described in Command line access.
  2. Log in as a user in the administrators group.
  3. Type mqcli to enter IBM MQ configuration mode.
  4. Type the following command to restore a queue manager from its backup file:
    mqrestore -f filename
    Where filename is the backup file located in the mqbackup:///QMgrs. The restoration might take some time, during which the CLI is not available.
    To restore a queue manager to an encrypted file system, type the command:
    mqrestore -f filename -e [-p passphrase]
    You can specify the passphrase as part of the command, or be prompted for it when you run the command. The passphrase can be between 1 and 512 characters. You should store a copy of the passphrase somewhere safe.