Skip to Content

How to restore primary using slave node?

Restore primary using slave node


Overview: This article describes how to restore the primary server using the slave node in Ezeelogin.


1. Login to the web interface of the slave node (secondary node).

2. Promote the secondary node to the Master node by selecting

3. Then remove the other node by

  •    Web Panel > Cluster > "Remove" button for "Other Node"

  • If you are unable to remove it, you can skip(3rd step) this step.

4. Install the same version of Ezeelogin on the new primary server.

  • Download the same version of the Ezeelogin package.

Note: If the IP Address is different from the old primary, migrate the license to the new IP from the Ezeelogin customer portal. It may display a warning message that the secondary node is having a primary license while installation, you can ignore the message.

 5. Execute the following command on the primary server(current master) to grant access to ezeelogin database from the secondary/slave node

:~# php /usr/local/ezlogin/grant_host.php  <ip_address of secondary node/slave>

6.  Execute the following command

:~# sh ezlogin_7.x.x.bin -- -secondary <ip_address of secondary/slave node> -othernode <ip_address of master node>

 7. Login into the web GUI of the current secondary and click on the cluster tab and click make master, so that it becomes master again.

FAQ:

1. Can we disable the slave server since we are currently using only the master node? 

Certainly, the choice to disable the slave server is yours, but keep a note that data synchronization between the master and slave servers will not occur if the slave is disabled. It is recommended to keep both servers running and synchronized for real-time data updates, as changes made to the master server will automatically sync with the slave server.


Related Articles:

Restore ssh logs.

Upgrade Ezeelogin to the new version.