This guide walks you through how to migrate Supermail 2.0 and its settings to another server. For this example the source server will be at 192.168.0.1 and the destination server will be at 192.168.0.2.
BACK UP THE DATABASE
Log into the source server:
ssh -v email@example.com
This command backs up the database:
/usr/etc/venture/bin/mysqldump -u root -p supermail > supermail_dump.sql
Then you need to backup Images folder from supermail root folder.
Congratulations! You just made a text file that contains all the data in the SuperMail database! This text file can be used as a restore for this server, or this text file can be moved to a new server to migrate report generator settings and data. (In this case, it’s the latter!)
MIGRATE THE DATABASE
You will want to push this file to the new server:
scp -v supermail_dump.sql firstname.lastname@example.org:/tmp/ssh -v email@example.com So that you can run these commands on the new server:
/usr/etc/venture/bin/mysql -uroot -p drop database supermail create database supermail /usr/etc/venture/bin/mysql -uroot -p supermail < supermail_dump.sql
Note: You will be prompted for a password both on the backup and restore. This password is usually the default NAPC password for the venture database.
After that you need to restore your Images folder.
MIGRATE THE APPLICATION
Since you are on the new server, you will need to type this command to exit back to the old server:
Now you will need to do a secure file copy to migrate the application:
scp -r /var/www/html/supermail firstname.lastname@example.org:/var/www/html/
TEST THE RESULTS
Open your web browser to this address to test:
And that's it!