Database Migration

The Database Migration node allows you to easily migrate the IceWarp Server's database from one database server to another one.

You may want to do this to change the physical server or to change the database technology in use (for example, upgrading from Microsoft Access to MySQL or Microsoft SQL Server).

Warning: In the case you are migrating a database, it is possible to migrate only from SQLite one to other engine.
Before you switch WebClient to a new database, stop control and delete all php sessions. Otherwise you will loose flags and other email statuses.
The MS SQL engine is not supported for Spam Reports and Active-Sync databases.

Figure. Server migration manager: Database Migration tab.

Field

Description

Database

Select which IceWarp Server database you want to migrate from the drop-down list.

Available databases are:

  • Accounts

  • Antispam

  • GroupWare

  • Directory Cache

  • WebClient

  • ActiveSync

  • Spam Reports

Source DSN

Click the Source DB button to define the source DSN for migration. The Database dialog opens.

Destination DSN

Click the Destination DB button to define the target DSN for the migration. The Database dialog opens.

Repair UTF-8 character set

Check the box if you want the server to check if the source database character set is valid UTF-8. If the data contains characters that are not valid UTF-8 ones, these characters are removed.

Start

Click the button to start migration process.

Figure. Database Migration tab: Database dialog.

Field

Description

DSN

Select the DSN of the database.

Server

Enter the hostname of the database server.

Username

Enter a username to access the database.

Password

Enter the password for the user.

Syntax

Select the database technology in use (this is required because of minor differences in SQL syntax).

Driver

Select a driver for the database technology you are using.

History

Select a DB connection string from the list of previously used ones.

Test Connection

Click the button to test whether the IceWarp Server can access the database with the details entered.

Spam Reports Database Migration

This migration (for MySQL) uses a migration script that can be executed also via the command line. See the example (default install path, default reports db, migrate to MySQL on localhost/root/root).

"c:\Program Files (x86)\IceWarp\php\php.exe" -c "c:\Program Files (x86)\IceWarp\php\php.ini" "<install_dir>\html\reports\migrate.php

" parameters="srcdbconnection=sqlite:c%3A%5CProgram%20Files%20(x86)%5CIceWarp%5Cspam%5Creports%

5Creports.db&srcdbuser=%s&srcdbpass=%s&srcdbsyntax=%s&destdbconnection=mysql%3Ahost%3Dlocalhost%3Bdbname%

3Dreports&destdbuser=root&destdbpass=root&destdbsyntax=%s"

Database Migration Logs

All database migration logs are saved within the icewarp\logs\migration directory.

The log filename is mig_YYYYMMDD_HHNNSS_<database_type>.log.

can be: 'Storage', 'Logs', 'GroupWare', 'ChallengeResponse', 'DirectoryCache', 'Webclient', 'EAS', 'Reports'.