On attempt to migrate a Plesk subscription containing a subdomain higher than 3rd level (for example
sub2.sub1.example.com) to Plesk Automation, the migration fails with the following output:
Subscription 'example.com' ¦ + error: An error occurred, when restoring hosting settings: ¦ Failed deployment of domain sub2.sub1.example.com ¦ ¦ + error: An error occurred, when restoring hosting settings: ¦ Execution of /usr/local/psa/admin/plib/api-cli/domain.php --create sub2.sub1.example.com -webspace-name example.com -do-not-apply-skeleton -notify false -guid 74f7466f-6593-48b2-b8ff-9abf7e843038 -creation-date 2015-08-14 -parent-domain-name example.com -skip-plan -ignore-nonexistent-options failed with return code 1. ¦ Stderr is ¦ An error occurred during domain creation: unable to set domain name: Unable to create the domain sub2.sub1.example.com because a DNS record pointing to the host sub2.sub1.example.com already exists. ¦ ¦ + error: The following sites of subscription were not restored - they do not exist on target panel: 'sub2.sub1.example.com'
Such behaviour has been considered as a software issue #PMT-1984 in PA Migration Tools: it is impossible to migrate a subdomain higher than 3rd level from Plesk to PA. This issue is planned to be fixed in one of the future updates. You can track it's status in PA release notes:
In order to work around the issue migrate the subscription without such subdomain and recreate it after migration:
- Create a backup of the subdomain (website content, mail directories) which cannot be migrated
- Remove the subdomain from the subscription
- Migrate the subscription to PA
- Manually recreate the subdomain in PA
- Manually restore the content of the subdomain from the backup.