Restoring the high availability environment

System administrators can restore the high availability (HA) environment in Eclipse Amlen by using the backup file that was created for the standby server.

  • You can restore the backup configuration and store only to the Eclipse Amlen software level that is greater than, or equal to, the Eclipse Amlen software level that the file was created with. That is, you cannot use a backup file that was created for a later version of Eclipse Amlen to restore to an earlier version of server.
  • As part of the restore process, you must clean the store unless you are using a backup of the store for this operation. Cleaning the store deletes all persistent data, including messages, subscriptions, and client states.
  • MQTT quality of service levels of message delivery cannot be guaranteed.
  • If you restore the store from a backed up version, consider that:
    • All messages that were buffered in the store after the store was backed up are lost.
    • Retained messages that were sent after the store was backed up are lost.
    • Messages that were in store buffers when the store was backed up, and which were sent later and discarded from the store, are restored and resent when subscribers reconnect. They are not marked as duplicate messages for JMS and MQTT.
    • Retained messages that were replaced after the store was backed up are restored. The messages that replaced the retained messages are lost.
  1. Check that the standby server is running by using the Eclipse Amlen REST API GET method with the following URI:
    http://<Standby-Server-IP:port>/ima/v1/service/status/
    1. Verify that the HA role is STANDBY. If the HA role is UNSYNC, wait for synchronization to complete before you proceed.
    2. If the standby server is in production mode, verify that the value of NewRole is STANDBY and that there are 2 SyncNodes.
  2. Messaging on the standby server must be stopped to ensure that the store is valid after the restore process. Set the server to maintenance mode using the Eclipse Amlen REST API POST method with the following URI:
    http://<Standby-Server-IP:port>/ima/v1/service/restart/

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server",
      "Maintenance": "start"
    }
  3. Check that the primary server is running using the Eclipse Amlen REST API GET method with the following URI:
    http://<Primary-Server-IP:port>/ima/v1/service/status/
  4. Messaging on the primary server must be stopped to ensure that the store is valid after the restore process. Set the server to maintenance mode using the Eclipse Amlen REST API POST method with the following URI:
    http://<Primary-Server-IP:port>/ima/v1/service/restart/

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server",
      "Maintenance": "start"
    }
  5. Use standard system tools to restore contents of the backup file to the appropriate directories for the designated primary server:
    • var/messagesight/data
    • var/messagesight/store
    Note: If you are operating in a Docker environment, ensure that you mount these directories on the host volume or volumes and restore the contents of the backup file to the corresponding host directory or directories.
  6. Optional: If you are not restoring the store data, clean the store on the restored primary server to ensure that the store contents remain synchronized. Use the Eclipse Amlen REST API POST method with the following URI:
    http://<Primary-Server-IP:port>/ima/v1/service/restart/

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server",
      "CleanStore": true
    }
  7. When the restored primary server is running, verify that all ntwork settings are correct.
  8. Clean the store on the standby server by using the Eclipse Amlen REST API POST method with the following URI:
    http://<Standby-Server-IP:port>/ima/v1/service/restart/

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server",
      "CleanStore": true
    }
  9. Both servers are now ready to be brought back into production mode. You must restart the restored primary server first to ensure that the restored configuration is applied. Set the restored primary server to production mode using the Eclipse Amlen REST API POST method with the following URI:
    http://<Primary-Server-IP:port>/ima/v1/service/restart/

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server",
      "Maintenance": "stop"
    }
  10. Restart the designated standby server and resynchronize it with the new primary server using Eclipse Amlen REST API POST method with the following URI:
    http://<Standby-Server-IP:port>/ima/v1/service/restart/

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server",
      "Maintenance": "stop"
    }
    Tip: If you have configured your HA environment to use auto-detect mode, you must perform this step immediately after step 9 so that the HA pair can be successfully reestablished. A discovery timeout might occur if there is significant delay between steps 9 and 10. For more information about the discovery timeout, see Configuring your system for high availability.