This document describes how to move hMailServer from one physical server to another. The procedure is split up into six steps.
If it is the first time you're following these steps, it's recommended that you do it in a test installation prior to doing it in a production installation. This is to ensure that you fully understand exactly what you need to do.
Before you begin moving your hMailServer installation to a new server, you should check that the new server matches the hMailServer requirements. Apart from the standard requirements.
Before you begin the actual data migration, you should install hMailServer on the new server. It is critical that you install the same version of hMailServer as you used on the old server, and that you install it in the same directory as on the old server. If you had hMailServer in C:\hMailServer on old server, you should have it in the same path on the new.
Before you backup your system, you typically want to stop your hMailServer service to make sure that no changes are made during the backup. It is of-course recommended that you notify your users in good time before doing this.
The hMailServer configuration and data will be copied manually from the old server to the new one. The backup is only needed if something goes very wrong during this process and you need to restore the old server.
There are three things you need to copy:
The data directory contains all messages and must be copied from the old server to the new one (unless they are located on a SAN which is accessible by both servers).
Any customizations you may have to hMailServer must be copied from the old server to the new one. This typically consists of modifications to the hMailServer script file.
The tasks involved in this step depends on what database server type you are using.
Built in MySQL
If you are using the built-in MySQL server, you can copy the entire Data and MySQL directories from the old server to the new server. If you do this, you also need to copy the Database password from hMailServer.ini on the old server to the new server so that hMailServer can log on the database server.
Before copying the directories, make sure that both the MySQL and hMailServer service is stopped.
External MySQL server
One method is to drop the hMailServer database on the new server, than copying the hMailServer database from the old server to the new one, or to do an export from the old server and import it into the new.
If you want to move your hMailServer database to a new Microsoft SQL Server installation one method is to backup the database and restore it on the new server. If you have created users and logins specifically for the hMailServer, you need to ensure that they still exists and are set up properly on the new installation
After moving the data, remember to: