Master server switch

By default, server 0 (zero) is the master server. To switch the master to another server, set the deployment option masterDatabaseServerID to the other server ID as follows:

  1. Start the command line:
    On Windows systems:
    iem login --server=servername:serverport --user=username 
    --password=password
    On Linux systems:
    ./iem login --server=servername:serverport --user=username 
    --password=password
  2. Retrieve the settings to switch the master server:
    On Windows systems:
    iem get admin/fields > c:\temp\switchmaster.xml 
    On Linux systems:
     ./iem get admin/fields > /appo/switchmaster.xml 
  3. In the switchmaster.xml file, add or edit the following keyword and its value:
      <Name>masterDatabaseServerID<Name>
      <Value>0</Value>
    to switch the master server to another master server:
    <?xml version="1.0" encoding="UTF-8"?>
    <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:noNamespaceSchemaLocation="BESAPI.xsd">
        <AdminField Resource="http://9.87.126.68:52311/api/admin/field
         /masterDatabaseServerID">
           <Name>masterDatabaseServerID</Name>
           <Value>3</Value>
        </AdminField>
    </BESAPI>
  4. Upload the modified file by running the following command:
    On Windows systems:
    iem post c:\temp\switchmaster.xml admin/fields
    On Linux systems:
     ./iem post /appo/switchmaster.xml admin/fields

After the value has successfully replicated to the new server, it become the master server. If a server has a failure while it is the master, another server must be made the master server by direct manipulation of the ADMINFIELDS table in the database.