WARNING: this procedure is under revision and therefore is here just for information purposes. Use at your own risk.

This procedure applies only after you have performed the Recovery procedure and you are using the slave server as your principal master server.

You can proceed with this procedure only when you have confirmed that your master server is working fine again and is connected to the network.

Step 1. Change role of your old master server (do this step as soon as possible)

    1. In the master server, run edinnM2_Console.exe as administrator.
    2. Open the Supervisor tab and change the rol from master to slave. This should have automatically stopped all services, which can be verified in the Activity tab.

This will block access from operation terminals and applications. This is because, now your slave server is working as master, and your master server is switched on again and probably already connected to the data network. In this situation, maybe some user terminals or applications would connect to the recently restored master server. This would cause that some users are connected and operating with the slave server, which now is acting as the master server, and some other users with the restored master server, and therefore, that would result in data loss for those operating with the recently restored master server.

Step 2. Stop all edinn M2 services in slave server (which is acting now as master server)

    1. Go to path C:\Program Files (x86)\edinn\edinnM2\Server and execute, with administrator permissions, the program edinnM2_Console.exe.
    2. In the Activity tab press “Stop service” in each of the services, going from bottom to top (starting with the Supervisor)

Step 3. Block access to the database of the slave server (which is acting now as master server)

On the slave server (which is acting now as master server), run SQLyog as administrator and execute the following query: "FLUSH TABLES WITH READ LOCK;"

Step 4. Backup the database of the slave server (which is acting now as master server)

As users and applications where interacting with the slave server, now we need to restore all this data to the master server. To do this, perform a database backup of the slave server (which is acting now as master):

    1. Open MySQL Administrator as administrator.
    2. Enter the backup tab, click on “New Project”, choose a Project Name and select the 2 databases from which you are going to perform the backup: the edinnm2 and the edinnm2_CompanyId database. Then click the > icon and Save Project.
    3. Click "Execute Backup now" and wait for the backup to terminate. Copy the generated backup file and paste it in the Server who is going to act as a Slave. Remember to not start the edinn services on the master server until indicated later.

Step 5. Copy, and retain for later, the license of the master server

    1. Go to path C:\Program Files (x86)\edinn\edinnM2\Server and execute, with administrator permissions, the program edinnM2_Console.exe.
    2. In the License tab, copy the license to a notepad or file, to be used later.

WARNING: do not forget to copy the License field content to a notepad of file. If you do not provide this valid license later for this master server, the master server will not work.

Step 6. Restore database in master server

Perform a database restore of the Backup that you generated in the previous step:

    1. From the Windows search icon, type “MySQL Administrator” and right-click the app returned and select “Run as administrator”.
    2. Enter the Restore tab, click on "Open Backup File", choose the backup file generated in the previous step, and then click "Open".
    3. Click on "Start Restore"

    1. Once restored, use a database editor (for example the SQLYog application recommended before), and edit the table edinnm2.comp and change, in all fields, the IP address of the master server by the IP address of this slave server.
    2. After performing the restore of the database, the edinn license of this server has been replaced by the license of the master server. Please paste the license from the notepad or file where you copied it in the previous step, or request for a new license to edinn

WARNING: if you do not provide a valid license for this master server, it will not work.

Step 7. Unlock database tables

In the slave server, run SQLyog as administrator and execute the following query: "UNLOCK TABLES;"

Step 8. Supervisor Configuration on the slave server

If you have the edinnM2_Console.exe running, close it. Then run again edinnM2_Console.exe as administrator and open the Supervisor tab. Confirm the following parameters:

Where:

    • Host name: is the remote host name. You can find it in the properties window of the master server computer.
    • Host IP: find it by writing the command "ipconfig" in cmd.exe in the master server computer.

Write here the information from the master server:

    1. Switch on the Activate checkbox: to enable the rest of the fields.
    2. Host name: is the name of the master server in the network, the one you are trying to connect to.
    3. Host IP: is the IP of the master server in the network.
    4. Port: write '10000'.

Step 9. Test connection with master server

After parameters are filled in, click on the button "Test Connection" to test the connectivity between the servers. Do this step from both the slave and the master server.

WARNING: Remember to do it for both servers because we need to guarantee that the servers can connect to each other and that they have the appropriate permissions.

If you forget to fill any field or you don’t do it rightly, a message box will appear showing you the reason of the error when testing the connection:

    • "Host IP is mandatory and must have a valid IP address."
    • "Host port is mandatory and must have a value between 0 and 65535."
    • "Host name is mandatory."

When field are good filled, you will be asked if you want to proceed to the test. Press "Yes" to proceed. If any error occurs, it will appear an error message like the one that follows:

If the connection can be stablished, a success message will appear: "Connection with HostI:Port successful!"

Step 10. Apply Recovery on slave server

  1. In the Console, Supervisor tab, Recovery section, select the Slave role.
  2. Press the "Apply" button of the Recovery section.

Step 11. Supervisor Configuration on the master server

Open the Supervisor tab. Confirm the following parameters:

Where:

    • Host name: is the remote host name. You can find it in the properties window of the slave server computer.
    • Host IP: find it by writting the command "ipconfig" in cmd.exe in the slave computer.

Write here the information from the slave server:

    1. Switch on the Activate checkbox: to enable the rest of the fields.
    2. Host name: is the name of the slave server in the network, the one you are trying to connect to.
    3. Host IP: is the IP of the slave server in the network.
    4. Port: write '10000'.

Step 12. Apply Recovery on the master server

    1. Select the Master role.
    2. Press the "Apply" button of the Recovery section.

Step 13. Failure Reporting Configuration

To enable server to inform by e-mail about the failures and other issues, you must enable Notifications in the Notifications tab and fill in the fields as you can see in the image bellow.

Remember to click on [Apply] button to save changes.

NOTE: for more information of the Notifications configuration, please see: Notification.

Step 14. Start services in the master server

    1. Go to path C:\Program Files (x86)\edinn\edinnM2\Server and execute, with administrator permissions, the program edinnM2_Console.exe.
    2. In the Activity tab press “Start service” in each of the services, going from top to bottom (starting with the Central)

Step 15. Start Supervisor service in the Slave server

    1. Go to path C:\Program Files (x86)\edinn\edinnM2\Server and execute, with administrator permissions, the program edinnM2_Console.exe.
    2. In the Activity tab press “Start serviceONLY for the Supervisor service.

Step 16. Inform users to reconnect to the master server on their operation terminals and applications

Inform all users on how to connect to the master server and provide them with the IP address and port of the master server.

END OF PROCEDURE

END OF PROCEDURE