Migrate EzyPlatform from server A to server B
Updated at 1764659067000On Server A
Let’s say you are in the /root directory. Now you will package EzyPlatform and dump the database.
Packaging EzyPlatform on Server A
You will package the ezyplatform directory on server A. For example, if your directory is named ezyplatform, you can use the following command:
zip -r ezyplatform.zip ezyplatform
You now have the file /root/ezyplatform.zip.
Dumping the database
Assume your database is named ezyplatform. You can dump it to an SQL file using:
mysqldump ezyplatform > ezyplatform.sql
After this, you will have /root/ezyplatform.sql, and the tasks on server A are completed.
On Server B
Assume you are also in the /root directory on server B. You will now proceed with the next steps.
Copy EzyPlatform
You need to copy the packaged EzyPlatform and the dumped database file from server A.
You can use any tool you like, or simply use scp as follows:
scp root@SERVER_A_IP:/path/to/files/ezyplatform.zip . scp root@SERVER_A_IP:/path/to/files/ezyplatform.sql .
Now you have these two files on server B:
/root/ezyplatform.zip/root/ezyplatform.sql
Importing the database
Next, follow the normal deployment steps in the standard installation guide.
However, in the database creation step, make sure to create a database with the same name, username, and password as on server A.
Once the database is created, you can import the tables using the MySQL client. For example:
mysql -u ezyplatform -p
Enter the password and log in. Then, inside the MySQL command-line interface, run:
source /root/ezyplatform.sql
That's it.
Extracting EzyPlatform
You will not download a fresh copy of EzyPlatform. Instead, extract the ezyplatform.zip file you copied from server A:
unzip ezyplatform.zip
Now you have the directory /root/ezyplatform.
You can cd into the ezyplatform directory and restart the necessary components such as admin and web (and socket, if used):
bash cli.sh "restart admin" bash cli.sh "restart web"
EzyPlatform should now be running successfully.
Configure DNS to point the domain to Server B and configure nginx
You can now access the domain provider’s control panel and update the DNS records for both the web and the admin domains to point to the IP of server B. After that, configure nginx accordingly.
And that’s it — EzyPlatform has been successfully migrated with just a few simple steps.