userrestore (restore user)

Restores messaging users and groups on the IBM® MQ Appliance from a file to which they were previously backed up.

Purpose

You can use the userrestore command to restore messaging users and groups from back up file containing the details for messaging users and groups.

Syntax

Read syntax diagramSkip visual syntax diagram userrestore -F -f file

Parameters

-F
If you specify the force option, the command replaces the configuration on the target appliance without requesting confirmation.
-f filename
Specifies the file containing the users and groups to restore. The file must be located in the mqbackup: location on the IBM MQ Appliance.

Usage notes

  • 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.

Examples

  • The following command restores users from the file backup_15115:
    
    userrestore -f backup_15115
    
    10 users and 5 groups will be added to the system, 5 users and
    1 group will be deleted and mqm group membership will be modified.
    
    Do you wish to proceed? Y/N
    <Y>
    userrestore completed successfully.
    
  • The following command restores users from the file backup_15122, and does not ask for user confirmation:
    
    userrestore -F -f backup_15122
    
    8 users and 4 groups will be added to the system, 2 users and
    1 group will be deleted and mqm group membership will be modified.
    
    userrestore completed successfully.