Moving to a new server

Overview

This document describes how to move hMailServer from one physical server to another. The procedure is split up into six steps.

  1. Check requirements
  2. Install hMailServer on new server
  3. Backup your system
  4. Move the data
  5. Check TCP/IP-related settings
  6. Confirm the migration

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.

Step 1 - Check requirements

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.

Step 2 - Install hMailServer on new server

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.

Step 3 - Backup your system

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.

Step 4 - Move the data

There are three things you need to copy:

Data directory

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

Customizations

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.

Database

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.

SQL Server

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

Step 5 - TCP/IP-related settings

After moving the data, remember to:

  • Update any MX record which was pointing at the old host name.
  • Update the host name in your hMailServer configuration (if it has changed)
  • Check that your Windows Firewall is not blocking traffic to hMailServer

Step 6 - Confirm the migration

  • Confirm that you can send email to your server from an external server
  • Confirm that you can log on the new server and access your email
  • Notify your users that the migration is complete, and optionally (if required) instruct them to update their email clients with the new host information.

Search documentation