Backing up and restoring your mqweb server configuration

You can back up your mqweb server configuration, and restore it to the same location, or a different location.

Before you begin

Before you can restore your mqweb server configuration, you must install IBM® MQ, or the stand-alone IBM MQ Web Server, on the system where you want to restore the mqweb server. In a stand-alone IBM MQ Web Server installation, you must create the mqweb server by following the steps in Configuring the stand-alone IBM MQ Web Server.

About this task

Follow the procedure in this task to back up and restore your mqweb server configuration. If you restore your mqweb server to a different location, you must update the mqweb server configuration to ensure that references to files are correct.

[MQ 9.4.0 Jun 2024]You can also use this procedure to migrate a mqweb server that currently runs in an IBM MQ installation to run in a stand-alone IBM MQ Web Server installation.

Procedure

  1. To back up the mqweb server configuration, copy all the files in the directory that contains the mqweb server configuration to your backup location.
    • In an IBM MQ installation, copy the contents of the following directory:
      • [AIX][Linux]On AIX® or Linux®: /var/mqm/web/installations/installationName
      • [Windows]On Windows: MQ_DATA_PATH\web\installations\installationName, where MQ_DATA_PATH is the IBM MQ data path. This path is the data path that is selected during the installation of IBM MQ. By default, this path is C:\ProgramData\IBM\MQ.
      • [z/OS]On z/OS®: the WebSphere® Liberty user directory that was specified when the crtmqweb script ran to create the mqweb server definition.
    • [MQ 9.4.0 Jun 2024][Linux]In a stand-alone IBM MQ Web Server installation, copy the contents of the MQ_OVERRIDE_DATA_PATH/web/installations/MQWEBINST directory, where MQ_OVERRIDE_DATA_PATH is the IBM MQ Web Server data directory that the MQ_OVERRIDE_DATA_PATH environment variable points to.
  2. To restore the mqweb server configuration, replace the contents of the directory that contains the mqweb server configuration with the files that you copied in step 1.
    • In an IBM MQ installation, replace the contents of the following directory:
      • [AIX][Linux]On AIX or Linux: /var/mqm/web/installations/installationName
      • [Windows]On Windows: MQ_DATA_PATH\web\installations\installationName, where MQ_DATA_PATH is the IBM MQ data path. This path is the data path that is selected during the installation of IBM MQ. By default, this path is C:\ProgramData\IBM\MQ.
      • [z/OS]On z/OS: the WebSphere Liberty user directory that was specified when the crtmqweb script ran to create the mqweb server definition.
    • [MQ 9.4.0 Jun 2024][Linux]In a stand-alone IBM MQ Web Server installation, replace the contents of the MQ_OVERRIDE_DATA_PATH/web/installations/MQWEBINST directory, where MQ_OVERRIDE_DATA_PATH is the IBM MQ Web Server data directory that the MQ_OVERRIDE_DATA_PATH environment variable points to.
  3. Set the ownership of the files that you restored in step 2 so that the mqweb server user ID can access the files.
  4. If you restored the mqweb server configuration to a different location, change the value of any properties in the mqweb server configuration that refer to files in the previous mqweb server configuration directory.
    1. Before you issue either the setmqweb or dspmqweb commands, set your environment to point to your mqweb server configuration.
      • [z/OS]On z/OS, set the WLP_USER_DIR environment variable so that the variable points to your mqweb server configuration, by entering the following command:
        export WLP_USER_DIR=WLP_user_directory
        where WLP_user_directory is the name of the directory that is passed to the crtmqweb command.

        For more information, see Create the mqweb server.

      • [MQ 9.4.0 Jun 2024][Linux]In a stand-alone IBM MQ Web Server installation, set the MQ_OVERRIDE_DATA_PATH environment variable to the IBM MQ Web Server data directory.
      • In all other environments, you do not need to complete any actions to set your environment.
    2. View the value of all configurable mqweb server properties that a user has modified. Issue the following command:
      dspmqweb properties -u
    3. If the remoteKeyfile property is displayed, check the value of the property.
      If the value of the property refers to a file path in the previous mqweb server configuration directory, change the value to refer to the file path in the new mqweb server configuration directory. Issue the following command to change the value of the remoteKeyfile property:
      setmqweb properties -k remoteKeyfile -v path_to_keyfile
    4. View the mqweb server remote queue manager configuration. Issue the following command:
      dspmqweb remote -a
    5. If any of the following properties are displayed, check the value of the property:
      • globalTrustStorePath
      • globalKeyStorePath
      • ccdtURL
      • keyStorePath
      • trustStorePath
      Change the value of any property that refers to a file path in the previous mqweb server configuration directory to refer to the file path in the new mqweb server configuration directory. Issue the setmqweb remote command to change the value of each property. For example, to change the value of the keyStorePath property for the remote queue manager with the unique name remote-QM1, issue the following command:
      setmqweb remote -uniqueName remote-QM1 -keyStorePath new_keystore_path