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:
- Start the command line:On Windows systems:
On Linux systems:iem login --server=servername:serverport --user=username --password=password
./iem login --server=servername:serverport --user=username --password=password
- 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
- In the
switchmaster.xml
file, add or edit the following keyword and its value:
to switch the master server to another master server:<Name>masterDatabaseServerID<Name> <Value>0</Value>
<?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>
- 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.