For Plesk on Windows

  1. Connect to the Plesk server via RDP.
  2. Start a command prompt as an Administrator.
  3. Create a database dump of the Plesk database plesk db dump psa > C:\psa_backup.sql
  4. Access the Plesk database: plesk db
  5. Run these commands to remove orphaned records: delete from dns_recs where dns_zone_id in (select id from dns_zone where id not in (select dns_zone_id from domains) and id not in (select dns_zone_id from domain_aliases)); delete from dns_zone where id not in (select dns_zone_id from domains) and id not in (select dns_zone_id from domain_aliases);
  6. Exit MySQL: mysql> exit
  7. Create the domain/subdomain/alias in Plesk / Rerun the migration/restore.