Migrating Data

The data transfer process involves the following steps:

  1. Check migrator updates. If a new version of migrator is available – perform automatic update of the tools.
  2. Perform quick connection, license, and service checks: for example, check that the source server is available by SSH, that the license is valid, that all required services such as web server, mail server and so on are started and are listening on the appropriate ports.
  3. Read and validate the migration list, which contains a list of subscriptions, clients, resellers to be migrated and their relations between each other – which subscription belongs to which customer and so on. Read an IP mapping file that configures which target IP address corresponds to source IP address. If IP mapping is not specified, migration tools will try to perform IP mapping automatically.
  4. Retrieve information from the source panel: configuration data of subscriptions that will be migrated, information about clients, resellers, plans, and other supplementary data.
  5. Retrieve information from the target panel for conflict resolution: which subscriptions, clients, and domains already exist on the target panel.
  6. Create administrator's reseller plans.
  7. Create resellers.
  8. Create hosting plans for administrator and resellers.
  9. Perform conflict resolution. For example, if a client with the same username exists on the source and on the target servers, but has different email addresses, migration will be stopped.
  10. Perform infrastructure checks: check connections between the source and target server by different protocols, check that there is enough disk space for migration.
  11. Configure Apache restart interval to speed up migration by avoiding frequent restarts of Apache because of configuration changes. At the end of migration, Apache restart interval is reverted to its initial value, and Apache is restarted to apply the new settings.
  12. Create customers.
  13. Create subscriptions (webspaces).
  14. Create auxiliary users (also known as service users) and their roles.
  15. For target Windows servers, Windows password security policy is disabled to avoid issues with migrated passwords. At the end of migration, initial security policy is restored.
  16. Transfer of APS packages required to register APS applications in Plesk.
  17. Hosting settings are restored – they include add-on domains, subdomains, mailboxes, databases. No files are copied at this moment, only hosting objects are created.
  18. Copy content of different types:
    1. Web files.
    2. Mail messages.
    3. Databases.
  19. After web content is copied, additional settings that depend on web files are restored. This includes: Web Presence Builder sites, APS applications, Windows virtual directory settings.
  20. Finally, the migration tool prints the results of migration: the number of successfully migrated subscriptions and a list of issues.

To start the transfer, issue the following command:

panel-migrator transfer-accounts config.ini

Below you can learn more about how the most important steps are carried out.

Create Subscription

Migration tools create subscription stubs on target Plesk 12 by using Plesk's command-line utility called “subscription”. At this stage, subscriptions have no content and all settings are default ones.

Restore Hosting

In this step, the settings of objects under a subscription are restored:

Restoration of hosting settings is performed by the following steps:

Copy Web

Web content is copied with the “rsync” utility. The process is slightly different for Unix and Windows.

On Unix:

  1. On the target server, migration tools run the “rsync” client command, specifying the IP address of the source server, an SSH key and the directory to copy.
  2. Rsync client uses SSH as a transport to copy files, so the default port 22 is used.

On Windows:

  1. Rsync server package is uploaded to the source server and installed.
  2. Rsync server configuration is created and put to rsyncd.conf.
  3. Rsync server is started. The server is listening on port 873.
  4. Rsync client is installed on the target Plesk 12 server.
  5. Migration tools run the “rsync” client on the target server, specifying the IP address of the source server, a password and the directory to copy.

Once content is copied, the migration tool updates file permissions to conform to the Plesk 12 security model.

Then migration tools perform the following additional actions that require web content:

  1. Register Web Presence Builder sites on target Plesk 12.
  2. Register APS applications on target Plesk 12.
  3. For Windows, restore Windows virtual directory properties, error documents, and MIME types.
Copy Mail Content

For Unix, mail directory is simply copied to /var/qmail/mailnames/ with the help of rsync.

For Windows, migration tools use PSAMailbackup utility to dump mailbox content on the source, and then PSAMailrestore utility to restore the dump on the target Plesk 12 server.

Copy Databases

Blank databases are initially created while restoring hosting setting. Here, we copy database content – tables, rows, and other database objects. If a database is located on the same server as before, nothing is done in this step.

MySQL

To copy MySQL content, the migration tools do the following:

  1. On the source server, run the “mysqldump” utility.
  2. Transfer the created dump to the target server.
  3. Restore the dump with the “mysql” command-line client.
PostgreSQL

To copy a PostgreSQL database, the migration tools do the following:

  1. On the source server, run the “pg_dump“ utility.
  2. Transfer the created dump to the target server.
  3. Restore the dump with the “pg_restore” utility.
Microsoft SQL Server

To copy Microsoft SQL Server databases, the migration tools use the dbbackup.exe utility bundled with Plesk 12. The tool uses .NET library functions to copy database content.