Article ID: 113310, created on Feb 10, 2012, last review on Jun 3, 2016

Symptoms

If there are customized DNS records with a host equal to the host of an existing subdomain, DNS records get lost after upgrading to Plesk 10.4.4:

Cause

During the upgrade a new "subdomain.example.com" DNS zone is created with default records based on server DNS template. As a result neither domain's zone nor subdomain's zone will contain the records created before the upgrade.

Workaround

Locate required records with the following SQL queries:

For Plesk below 10.2 for Linux:

``MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e "SELECT DISTINCT dns_recs.dns_zone_id, dns_recs.type, host, val, opt FROM dns_recs, subdomains, domains WHERE host = concat(subdomains.name,'.', domains.name,'.') AND domains.id = subdomains.dom_id AND dns_recs.dns_zone_id IN ( SELECT dns_recs.dns_zone_id FROM dns_recs, subdomains, domains, hosting, IP_Addresses WHERE host = concat(subdomains.name,'.', domains.name,'.') AND subdomains.dom_id = domains.id AND domains.id = hosting.dom_id AND hosting.ip_address_id = IP_Addresses.id AND IP_Addresses.ip_address <> dns_recs.val)"``For Windows if Plesk's DB stored in Jet or MSSQL\* :`"%plesk_bin%\dbclient.exe" --direct-sql --sql="SELECT DISTINCT dns_recs.dns_zone_id, dns_recs.type, host, val, opt FROM dns_recs, subdomains, domains WHERE host = (subdomains.name + '.' + domains.name + '.') AND domains.id = subdomains.dom_id AND dns_recs.dns_zone_id IN ( SELECT dns_recs.dns_zone_id FROM dns_recs, subdomains, domains, hosting, IP_Addresses WHERE host = (subdomains.name + '.' + domains.name + '.') AND subdomains.dom_id = domains.id AND domains.id = hosting.dom_id AND hosting.ip_address_id = IP_Addresses.id AND IP_Addresses.ip_address <> dns_recs.val)"`For Windows if Plesk's DB stored in MySQL\* :`"%plesk_bin%\dbclient.exe" --direct-sql --sql="SELECT DISTINCT dns_recs.dns_zone_id, dns_recs.type, host, val, opt FROM dns_recs, subdomains, domains WHERE host = concat(subdomains.name,'.', domains.name,'.') AND domains.id = subdomains.dom_id AND dns_recs.dns_zone_id IN ( SELECT dns_recs.dns_zone_id FROM dns_recs, subdomains, domains, hosting, IP_Addresses WHERE host = concat(subdomains.name,'.', domains.name,'.') AND subdomains.dom_id = domains.id AND domains.id = hosting.dom_id AND hosting.ip_address_id = IP_Addresses.id AND IP_Addresses.ip_address <> dns_recs.val)"`

You can find where Plesk's DB stored in registry at:

For Plesk below 10.2 for Windows x32:

[HKEY\_LOCAL\_MACHINE\\SOFTWARE\\PLESK\\PSA Config\\Config\\PLESK\_DATABASE\_PROVIDER\_NAME]

For Plesk below 10.2 for Windows x64:

[HKEY\_LOCAL\_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config\\PLESK\_DATABASE\_PROVIDER\_NAME]

For Plesk above 10.2 for Linux:

``MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e "SELECT DISTINCT dns_recs.dns_zone_id, dns_recs.type, host, val, opt FROM dns_recs, subdomains, domains WHERE host = concat(subdomains.name,'.', domains.name,'.') AND dns_recs.dns_zone_id IN ( SELECT dns_recs.dns_zone_id FROM dns_recs, subdomains, domains, hosting, IP_Addresses, DomainServices, IpAddressesCollections WHERE host = concat(subdomains.name,'.', domains.name,'.') AND subdomains.dom_id = domains.id AND domains.id = DomainServices.dom_id AND DomainServices.type = 'web' AND DomainServices.ipCollectionId = IpAddressesCollections.ipCollectionId AND IpAddressesCollections.ipAddressId = IP_Addresses.id AND IP_Addresses.ip_address <> dns_recs.val)"``For Windows:`"%plesk_bin%\dbclient.exe" --direct-sql --sql="SELECT DISTINCT dns_recs.dns_zone_id, dns_recs.type, host, val, opt FROM dns_recs, subdomains, domains WHERE host = concat(subdomains.name,'.', domains.name,'.') AND dns_recs.dns_zone_id IN ( SELECT dns_recs.dns_zone_id FROM dns_recs, subdomains, domains, hosting, IP_Addresses, DomainServices, IpAddressesCollections WHERE host = concat(subdomains.name,'.', domains.name,'.') AND subdomains.dom_id = domains.id AND domains.id = DomainServices.dom_id AND DomainServices.type = 'web' AND DomainServices.ipCollectionId = IpAddressesCollections.ipCollectionId AND IpAddressesCollections.ipAddressId = IP_Addresses.id AND IP_Addresses.ip_address <> dns_recs.val)"` Make a backup of them so that you could restore them manually after the upgrade.

Email subscription for changes to this article
Save as PDF