Restoring messaging users

You can restore messaging user accounts that you previously backed up.

About this task

You copy a file that contains the backed up user accounts to the target appliance. You then use a command to restore the accounts.

The following rules are applied when messaging users are restored:
  • All existing messaging user and group configurations in the target appliance are replaced by the user and group configurations from the backup file, with the exception of system users and groups, and the mqm user and group (which have special handling).
    • The system users include root, mqm, mqsystem, hacluster, and sshd.
    • The system groups include root, mqm, haclient, sshd, and utmp.
    • The membership of the mqm group on the target appliance will be replaced with the group membership of the mqm from the backup file. (The ID of the mqm group is never changed.)
  • Any messaging users or groups that exist on the target appliance but are not present in the backup file are deleted from the target appliance.
  • The userrestore command prompts for confirmation (Y/N) after processing the backup file, but before restoring the configuration. The number of users that will be deleted and added by the command is displayed.

Procedure

  1. Copy the file containing the backed up user accounts to the appliance:

    To copy the file by using the command line interface:

    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 the following command to enter configuration mode:
      config
      
    4. Copy your saved backup file to the target appliance:
      copy scp://username@ipaddress/[/]directorypath/filename mqbackup:
      
    5. Type exit to leave config mode.

    To copy the file by using the IBM MQ Appliance web UI:

    1. Start the IBM MQ Appliance web UI, and click the administration icon shows the admin icon.
    2. Select Main > File Management to open the File Management window.
    3. Select Upload files from the mqbackup folder menu.
    4. Drag and drop or browse for the file on your local system.
    5. Click Upload to upload the file to the mqbackup directory on the appliance.
  2. If you are not already connected to the appliance command line, connect as described in Command line access.
  3. Type mqcli to enter IBM MQ configuration mode.
  4. Type the following command to restore the messaging users:
    userrestore -f user_backup_filename 
    
    You are told how many users and groups will be deleted, and how many created, and are asked to confirm the operation. You can specify the -F (force) parameter to skip the user confirmation.