Migration from v7

Introduction

WebMail Pro 8 comes with a migration script dev/migrate.php you can use to migrate user accounts, settings, contacts, calendars, files from version 7 of the product to v8 installation.

To prevent unauthorized access to the script, so that it can only be called by the installation owner, the script can be password-protected.

Prerequisites and limitations

  1. Data migration procedure assumes that both v7 and v8 installations are on the same server. You need to have WebMail Pro 8 installed, with database set up and tables created.

  2. The script has been tested with the latest 7.7 release of the product. If you're migrating from at an older version of the product, it's recommended to upgrade first.

  3. Currently, WebMail Pro 8 supports MySQL database backend only.

Migration setup

dev/migrate.php script contains the following line:

$sP7ProductPath = "PATH_TO_YOUR_WEBMAIL_V7_INSTALLATION";

You need to replace that value with the actual path of your v7 installation.

Also, you can supply a password as $sPassword value, for example:

$sPassword = "p54321p";

Migrating all user accounts

In the simplest case, if you wish to migrate all the user accounts, you need to navigate to dev/migrate.php script in web browser:

https://yourdomain.com/webmail/dev/migrate.php

It will prepare database and filesystem structures for copying data and will proceed with migrating user accounts to your v8 installation. After copying each user, the script restarts itself so you can observe the process.

If you chose to protect your script with a password, supply the password via ?pass URL parameter, for example:

https://yourdomain.com/webmail/dev/migrate.php?pass=p54321p

Migrating selected users

If you only need to migrate specific user accounts rather than all of them, start the script with ?user_list URL parameter, like this:

https://yourdomain.com/webmail/dev/migrate.php?user_list

If you chose to protect your script with a password, supply the password via ?pass URL parameter additionally to ?user_list:

https://yourdomain.com/webmail/dev/migrate.php?user_list&pass=p54321p

The script will create user_list file under data directory, it will contain a complete list of user accounts found on v7 installation. Review the list and remove users you don't need to be migrated. After that, run the script without ?user_list parameter, to migrate those users listed in user_list file.

Troubleshooting

During the migration, script creates a number of files under data directory:

  • user_list is generated to maintain complete list of user accounts to be migrated;
  • migrated-users lists user accounts migrated successfully;
  • not-migrated-users lists accounts migration has failed for;
    (if all accounts migrated successfully, the file is not created)
  • migration contains information on the current script run iteration.

Also, if logging was enabled in admin area, log files are created under data/logs directory, their filenames start with migration-.

Restarting migration

If there was an error during the migration and you start the script again, it will proceed from the point where the error has occured. But if you wish to run the migration process from scratch, you need to perform the following steps:

  1. Delete migration file.
  2. Delete and recreate database tables used by v8 installation.
  3. Restart migration script.