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.

  1. BACK UP THE DATABASE

    Log into the source server:

    ssh -v root@192.168.0.1

    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!)

  2. MIGRATE THE DATABASE

    You will want to push this file to the new server:

    scp -v supermail_dump.sql root@192.168.0.2:/tmp/
    ssh -v root@192.168.0.2 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.

  1. MIGRATE THE APPLICATION

    Since you are on the new server, you will need to type this command to exit back to the old server:

    exit

    Now you will need to do a secure file copy to migrate the application:

    scp -r /var/www/html/supermail root@192.168.0.2:/var/www/html/
  2. TEST THE RESULTS

    Open your web browser to this address to test:

    http://192.168.0.2

    And that's it!