Skip to Content

Migrate Ezeelogin to the latest version from any previous release

How to migrate Ezeelogin installation from the old server to the new server?


Contact [email protected] to issue the temporary license for migration.


Overview: This article will help Ezeelogin super admin users to migrate Ezeelogin from an old server to a new server with the latest version, without affecting the settings and configurations ensuring you are running the most recent version of PHP supported.


Method 1: If the old server has MySQL connectivity to the new server, follow the steps below. Otherwise, proceed with Method 2.

Install dependency packages of the new OS. Refer detailed article to install dependency packages.

On the old server

Step 1. Log in to the old server and check if it has MySQL connectivity to the new server.

root@old_server:~# telnet new_server_ip 3306

Step 2. Execute the command below to fetch the database credentials from the old server.

root@old_server:~# php /usr/local/ezlogin/eztool.php -show_db_credentials

On the new server

Step 3. Download the latest Ezeelogin package to the new server. Check the billing portal to find the most recent version.

root@new_server:~# wget https://downloads.ezeelogin.com/ezlogin_7.xx.xx_php83.bin    #For PHP 8.3

root@new_server:~# wget https://downloads.ezeelogin.com/ezlogin_7.xx.xx_php82.bin    #For PHP 8.2

root@new_server:~# wget https://downloads.ezeelogin.com/ezlogin_7.xx.xx_php81.bin    #For PHP 8.1

Step 4. Install Ezeelogin on new server with correct parameters from old server.

root@new_server:~# sh ezlogin_7.xx.xx_php82.bin -- -migrate -old_dbhost oldserver_ip -old_dbport 3306 -old_dbuser ezlogin_user -old_dbpass 'password' -old_dbname ezlogin_dbname -old_dbprefix prefix_

eg: sh ezlogin_7.38.0_php82.bin -- -migrate -old_dbhost 192.168.56.216 -old_dbport 3306 -old_dbuser ezlogin_hzi -old_dbpass 'Bb.UB2*wh7$)KtPRb9$X2ks' -old_dbname ezlogin_iyust -old_dbprefix jby_

On the old server

Step 5. After successful installation, make sure to copy the required files from old server.

root@old_server:~# rsync -art /usr/local/etc/ezlogin/build.dat root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_clkey root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_clkey.pub root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_key root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_key.pub root@new_server_ip:/usr/local/etc/ezlogin/

root@old_server:~# rsync -art /var/log/ezlogin/* root@new_server_ip:/var/log/ezlogin/

Log in to the Ezeelogin software GUI and shell (ezsh), and add a test server and test user to ensure everything is working correctly!

After completing the migration and log file transfer, ensure that all user logins and activities are conducted through the new server, and discontinue access to the old one to maintain consistency and prevent conflicts.


Method 2: If the old server has no MySQL connection to the new server, manually back up and restore the database to the new server, then install Ezeelogin.

Install dependency packages of the new OS. Refer detailed article to install dependency packages.

On the old server

Step 1. Backup full database from old server.

root@old_server:~# mysqldump -u root $(grep -oP 'db_name\s+\K\S+' /usr/local/etc/ezlogin/ez.conf) > $(grep -oP 'db_name\s+\K\S+' /usr/local/etc/ezlogin/ez.conf)_backup.sql

Step 2. Copy database dump file to new server.

root@old_server:~# scp $(grep -oP 'db_name\s+\K\S+' /usr/local/etc/ezlogin/ez.conf)_backup.sql root@new_server_ip:/root/

On the new server

Step 3. Create and restore the database on new server.

root@new_server:~# ls ezlogin_*                                               #to find the backup file

root@new_server:~# mysql -u root -p -e "create database database_name;"       #create database

eg: mysql -u root -p -e "create database ezlogin_iyust;"                               

root@new_server:~# mysql -u root -p database_name < /database_backup.sql      #restore database

eg: mysql -u root -p ezlogin_iyust < ezlogin_iyust_backup.sql

Step 4. Grant database user privileges before proceeding with the installation.

root@new_server:~# mysql> GRANT ALL PRIVILEGES ON ezlogin_database.* TO 'ezlogin_user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

eg: GRANT ALL PRIVILEGES ON ezlogin_iyust.* TO 'ezlogin_hzi'@'localhost' IDENTIFIED BY 'Bb.UB2*wh7$)KtPRb9$X2ks' WITH GRANT OPTION;

mysql> flush privileges;

Step 5. Install Ezeelogin on new server with correct parameters.

root@new_server:~# sh ezlogin_7.xx.xx_php82.bin -- -migrate -old_dbhost localhost -old_dbport 3306 -old_dbuser ezlogin_user -old_dbpass 'password' -old_dbname ezlogin_dbname -old_dbprefix prefix_

eg: sh ezlogin_7.38.0_php82.bin -- -migrate -old_dbhost localhost -old_dbport 3306 -old_dbuser ezlogin_hzi -old_dbpass 'Bb.UB2*wh7$)KtPRb9$X2ks' -old_dbname ezlogin_iyust -old_dbprefix jby_

On the old server

Step 6. After successful installation, make sure to copy the required files from old server.

root@old_server:~# rsync -art /usr/local/etc/ezlogin/build.dat root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_clkey root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_clkey.pub root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_key root@new_server_ip:/usr/local/etc/ezlogin/
root@old_server:~# rsync -art /usr/local/etc/ezlogin/id_key.pub root@new_server_ip:/usr/local/etc/ezlogin/

root@old_server:~# rsync -art /var/log/ezlogin/* root@new_server_ip:/var/log/ezlogin/

Log in to the Ezeelogin software GUI and shell (ezsh), and add a test server and test user to ensure everything is working correctly!

After completing the migration and log file transfer, ensure that all user logins and activities are conducted through the new server, and discontinue access to the old one to maintain consistency and prevent conflicts.


How to install slave for the newly migrated Ezeelogin?

Slave should be freshly installed for the newly migrated Ezeelogin. Refer detailed article to install slave node.