I am trying to migrate a domain which uses a database hosted on a remote database server, but the migration fails.
Plesk does not yet support the migration of domains with remote databases.
The issue will be fixed in a future update for which a new Knowledge Base article will be created. You may subscribe to receive notifications about Plesk product updates.
Two different workaround scenarios are available:
Scenario 1 (recommended):
You have not yet attempted to perform the migration.The remote database server is registered both on the source and target Plesk servers.
Before starting the migration, do the following on the target server:
- Rename the
Rename the fix below that is suitable for your PP version to "DatabaseManager.php" and place it into
- Rename the
Migrate the domains/clients which have remote MySQL databases.
Restore the original DatabaseManager.php from the backup made in Step 1.
Migrate the rest of the domains/clients.
When the migration completes, follow the instructions from Step 1, but for the source server.
(The most important step) Check whether the databases have been correctly deployed to the destination server.
Remove the domains with remote MySQL databases from the source server.
- Restore the original DatabaseManager.php from the backup made in Step 5. This is mandatory to preserve the business logic.
Scenario 2 (easy, but not very safe):
You have not yet assigned the remote MySQL server to the destination server. The migration has already been performed, and the domain is no longer available on the source server.
Note: The domain must already be assigned to the local MySQL server.
Assign the remote database server to the target PP server, and set it as default. After the migration, it will still contain the domains' databases, so we just need to replace the local database server with it.
Interchange the IDs of the database servers in the psa.DatabaseServers table:
mysql> select id,host from psa.DatabaseServers; +----+------------+ | id | host | +----+------------+ | 1 | localhost | | 2 | remote | +----+------------+
Note: The exact commands are omitted.
- Remove (deassign) the local database server from the target PP server.