• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Upgrading Plesk 9 to 10 and Debian Lenny to Squeeze

LarsenD

Regular Pleskian
Hi,

I want to upgrade Plesk 9 to 10 and after that Debian Lenny to Squeeze. Now, before I run with open eyes into my doom, I thought I would ask you if there is anything that needs to be done/checked before. The year before I already updated Debian Etch to Lenny so I´ve got some knowledge already.

Anything specific to look for when updating Plesk?
Anything for the Squeeze update?


Lars
 
So, I took a deep breath and updated Plesk 9.5.4 directly to 10.4.4. Maybe these notes will help anyone else. OS is Debian Lenny (will be updated later on).

- Backup first
- Run "/usr/local/psa/admin/bin/autoinstaller | tee -ai /root/plesk_update_`hostname`.log"
The installer starts a pre-check and gives you some hints what should be fixed before an update. Currently, this script has a bug (see http://forum.parallels.com/showthread.php?t=257007), so you can ignore the warning about the IP-adress.
The "tee" command will save the output for later investigation.
- After installation has finished, login to Plesk and follow the instructions on screen to finish the transition to Plesk 10
- Check the logfile for any problems and fix them
- Run "apt-get autoremove" to remove old unused packages

Things you should look for in the logfile:
- "File on system created by you or by a script." --> Plesk stores the new version in a separate file. Compare those files and see if the new file should be used or at least merged with the old one
- "Unable to restore DNS template references for DNS zone with id=3" --> I got this error message for two domains where DNS was disabled. Not sure if this is a problem.
- "Some problems are found during Unable to determine correct owner, group and access rights for XXX/error_docs/maintenance.html" --> I ignored these as I couldn´t find anything wrong. Ownership of the file was root.root.
- "dpkg-divert: `diversion of /etc/init.d/spamassassin to /usr/share/spamassassin/spamassassin.init.real by psa-spamassassin' clashes with `diversion of /etc/init.d/spamassassin to /etc/init.d/spamassassin.real by psa-spamassassin'" --> I ignored this as only psa-spamassassin is used at boot time ("sysv-rc-conf --list | grep spam")
 
Some more error messages I came upon...

==== Your have 1 clients with no domains defined ====
Client can be deleted before updating

==== You have 1 clients who are free to manage resources on their domains themselves ====
Seems to cause no problems when switching the business model after the update.

==== You have client 1 with default permissions. ====
Find the client within "/root/parallels/PSA_10.4.4/examiners/clients_have_default_permissions.log", open the client in Plesk and go to "Account > Permissions". Just hit "ok" once.

==== Your have 1 clients with Domain Administrators defined on more than one domain. ====
Seems to be no problem for switching the business model after the update.

==== Some customers have e-mail addresses coinciding with the Panel administrator's e-mail address ====
Find those customers within "/root/parallels/PSA_10.4.4/examiners/plesk10_preupgrade_checker.log" and change their email-address

==== Each subdomain registered in Panel has a number of DNS records that derive from the Panel DNS template ====
Check with:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select dns_zone_id, type, host, val, opt from dns_recs where host in (select concat(s.name,'.', d.name,'.') from subdomains s, domains d where s.dom_id = d.id order by dns_zone_id);"

Sometimes need to be recreated after the update.

==== You have ... mailbox users that will be converted to subscription-level auxiliary users after upgrading to Panel 10 ====
(Text from Parallels)
Before upgrading the Plesk to 10.x version, you need to find the mail accounts which are having encrypted passwords:
mysql -u admin -p`cat /etc/psa/.psa.shadow` -e "SELECT CONCAT(m.mail_name,'@',d.name) AS mail, a.type, a.password FROM domains d, mail m, accounts a WHERE m.dom_id=d.id AND m.account_id=a.id AND a.type <> 'plain'" psa

After executing this command you will get the details of the mail accounts with encrypted password. In-order to change the password to plain text you should change the password of this mail account from the Plesk panel. When a password is changed through Parallels Plesk Panel, it's saved as a "plain" type

If there is no mail accounts with encrypted password, you can start upgrading the Plesk without making any changes.

After completing the upgrade you need to check whether any mail accounts is present in the database with user ID other than '0'. If any such mail accounts are present, you need to update the user ID to value '0'. In Plesk 10.x versions all mail accounts are having user ID as 0.

To check mail accounts with user ID other than 0
mysql -u admin -p`cat /etc/psa/.psa.shadow` -e "select * from mail where userId !=0" psa

To update user ID to 0:
mysql -u admin -p`cat /etc/psa/.psa.shadow` -e "update mail set userId=0 where userId !=0;" psa

==== There is a number of DNS records for the subdomains that you manually added to domain DNS zones ====
If you upgrade to Panel 10.4.4, these records will be lost. Check http://kb.parallels.com/en/113310 for more details.

Check with:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -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 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)"

Only TXT- and MX-records seem to get lost

=== Problems with subdomains ===
* vhost.conf needs to be copied to another place
mv /var/www/vhosts/##domain##/subdomains/##subdomain##/conf/vhost.conf /var/www/vhosts/##subdomain##.##domain##/conf
* SSL will be activated even if it wasn´t before
* PHP might need to be reactivated again

=== Transition to new business model won´t complete ===
(Text from Parallels)
The root cause of this issue that was in some obsolete limits for customers, which was remove in new version, but for some reasons this did not transitioned.

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id,NAME,cl_id,vendor_id from domains where cl_id = vendor_id;"
--> die zugehörigen cl_id,vendor_id gibt es vermutlich nicht

Applied transition scheme should set vendor_id for such domains to parent_id of domain owner, i.e. domains.vendor_id = clients.parent_id for clients.id = domains.cl_id. Now there is only one such vendor - 'admin':
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id,login from clients where parent_id is null;"

Use this ID in the following statements.

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id,login from clients where parent_id != ##ID##;"
--> will probably be empty

The solution is to set vendor_id = ##ID## for all domains mentioned above (where cl_id = vendor_id):
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "update domains set vendor_id=##ID## where cl_id=vendor_id;"
 
After that, updating Debian Lenny to Squeeze was easy. Just follow the instructions and run Plesk´s autoinstaller afterwards:

/usr/local/psa/admin/bin/autoinstaller
 
Thanks

Though it seems like you're talking to yourself.... this info is really useful and appreciated, since I'm in the same boat.
 
Thx =)

In the past, I noticed many threads were someone had the exact same problem, perhaps even stating that he solved the problem, but totally missing what had to be done. Therefore, I know it´s always good to post solutions.
 
PS: And it´s very nice to hear that it actually helped someone. Did you have any other problems not described here?
 
Back
Top