Applicable to:
- Plesk Onyx for Linux
- Plesk Obsidian for Linux
How to perform a dist-upgrade?
Warning: The dist-upgrade procedure is not suggested and instead the suggested approach is the migration as can be seen here: Plesk Migration and Transfer Guide
Warning: The dist-upgrade procedure can not be performed in a containerized environment. If this is not known, contact the server provider in order to know if the server or the environment is a container.
The dist-upgrade procedure is supported in Plesk as per the following versions:
Supported for | Plesk version |
---|---|
Ubuntu 18 > Ubuntu 20 | Plesk Obsidian 18.0.33 and above |
Ubuntu 16 > Ubuntu 18 | Plesk Obsidian 18.0.30 and above |
Debian 9 > Debian 10 | Plesk Obsidian 18.0.30 and above |
Ubuntu 14 > Ubuntu 16 | Plesk 17.8 |
Debian 8 > Debian 9 | Plesk 17.8 |
If you have never performed dist-upgrade before, it is recommended to test it first as follows:
-
Install the previous version of OS on a test server or inside a virtual machine. Upgrade it using instructions provided in the documentation by the OS vendor:
-
Solve all potential problems and make sure that Plesk is working after the upgrade. Only after that run the upgrade on the production server.
If you want or need Plesk to assist on this task or to do it on your behalf, it can be requested to Plesk Professional Services team here: Plesk Professional Services: Administrative Services
Ubuntu distributions
Warning: dist-upgrade
from Ubuntu 14 to Ubuntu 16 and is supported by Plesk Onyx 17.8 version.
Warning: During an upgrade from Ubuntu 14 to Ubuntu 16, system PHP 5.x shipped by OS vendor will be upgraded to PHP 7.x. So to avoid any PHP compatibility issues, before an upgrade, it is highly recommended to switch all sites having PHP handler 5x by OS vendor to corresponding custom PHP handlers. Please refer to these KB articles for details: How to configure PHP handlers in Plesk for Linux? and How to apply new PHP handler to multiple domains via CLI?
Warning: Also, MySQL server upgrade can fail during the upgrade. The issue and its resolution are described in: Dist-upgrade from Ubuntu 14 to 16 fails: Sub-process /usr/bin/dpkg returned an error code (1).
Warning: if PHP by OS vendor was updated from third-party sources prior to dist-upgrade, it may break webmail functionality.
-
Create a full server backup. Before the upgrade, make a full server backup. Also notify the customers about upcoming downtime of one to three hours.
-
Run below script and follow the wizard:
# /opt/psa/bin/distupgrade.helper.ubt14-ubt16.x64.sh
The script logs all its actions in
/var/log/plesk/install/plesk-distupgrade.log
. -
During the script execution you will be asked to reboot the server. Reboot the server.
-
After the server reboot, run the script once again.
Warning: dist-upgrade
from Ubuntu 16.04 to Ubuntu 18.04 is supported by Plesk Obsidian since 18.0.30 version.
Note: During this procedure, neither MySQL or MariaDB are upgraded. The MariaDB-10.x or MySQL-8 is done at your own will and risk.
Preparing server for upgrade
-
Create a full server backup. Before the upgrade, make a full server backup. Also notify the customers about upcoming downtime of one to three hours.
-
Update the current system to the latest available versions:
# apt-get update && apt-get upgrade
Note: the dist-upgrade procedure is supported (and has been tested) for Plesk version since 18.0.30
Performing the dist-upgrade
-
Update source.list file and configure the repository for the OS release that is going to upgrade to:
# cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://autoinstall.plesk.com/PSA_18.0.31/ bionic all
deb http://autoinstall.plesk.com/ubuntu/PHP70_17 bionic all
deb http://autoinstall.plesk.com/PHP71_17/ bionic all
deb http://autoinstall.plesk.com/PHP72_17/ bionic all
deb http://autoinstall.plesk.com/PHP73_17/ bionic all
deb http://autoinstall.plesk.com/PHP74_17/ bionic all
deb http://autoinstall.plesk.com/debian/SITEBUILDER_17.8.12 all all
deb [arch=amd64] http://autoinstall.plesk.com/PMM_0.1.11 bionic all
deb [arch=amd64] http://autoinstall.plesk.com/NODE_0.0.2 all all
deb https://packages.grafana.com/oss/deb stable main
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stableNote: The example above is for an installed version of Plesk Obsidian 18.0.31. The correct link for each installed version must be modified accordingly.
For example:http://autoinstall.plesk.com/PSA_x.y.z/
Whereas the versionx.y.z
is the current Plesk installed version, which can be found in the output of the command:# plesk -v
-
Update the repositories:
# apt-get update
-
Upgrade the kernel:
# apt-get install linux-generic
-
Reboot the server.
-
Update dpkg package:
# apt-get install dpkg
-
Update apt package:
# apt-get install apt
-
Get the Plesk packages that need to be upgraded. It can be done manually from the URL present in the
/etc/apt/sources.list.d/plesk.list
file. -
Upgrade the list of packages, for example:
# apt-get install plesk-php72 plesk-php73 plesk-php74 plesk-core plesk-core-utilities plesk-backup-utilities pp18.0.31-bootstrapper sw-engine-cli-2.31 libcurl4 plesk-service-node-utilities sw-collectd apache2 awstats psa-drweb-configurator psa-horde psa-imp psa-ingo psa-kronolith psa-mnemo psa-passwd psa-php-configurator psa-proftpd psa-turba libapache2-mod-passenger-plesk passenger plesk-config-troubleshooter plesk-git-http libcgi-fast-perl libcgi-pm-perl libcurses-perl libcurses-ui-perl libencode-locale-perl libfcgi-perl libfile-copy-recursive-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libnet-xwhois-perl libterm-readkey-perl liburi-perl
Note: If prompted, the
/etc/awstats/awstats.conf
, if it has not been manually modified, install config made by package maintainersNote: When prompted, you should keep previous version of
/etc/apache2/apache2.conf
Warning: after this operation apache2 won't start due to problems with http_proxy module.
-
Disable it by removing file
/etc/apache2/mods-enabled/proxy_http.load
# rm /etc/apache2/mods-enabled/proxy_http.load
-
Start apache:
# systemctl start apache2.service
-
-
Upgrade the following packages:
# apt-get install sw-nginx sw-cp-server plesk-engine plesk-control-panel
-
Execute the dist-upgrade command:
# apt-get dist-upgrade
-
Update Plesk to next available version:
# plesk installer update
-
Reboot the server.
-
Check that Plesk and all its services are working.
Warning: The dist-upgrade
process from Ubuntu 18.04 to Ubuntu 20.04 is supported by Plesk Obsidian 18.0.33 version.
Warning: The dist-upgrade
process from Ubuntu 18.04 to Ubuntu 20.04 is supported with MariaDB scenario only.
Preparing server for upgrade
-
Create a full server backup. Before the upgrade, make a full server backup (which is includes a full backup of all the databases). Also notify the customers about upcoming downtime of one to three hours.
-
Remote management module must be installed on the server (This is because in some tests, sshd service could not be started during the process)
-
Connect and perform the process connected as root or by using the
# su -
or# sudo su -
command. -
Uninstall unsupported components like docker, PHP below 7.0, Watchdog (Ubuntu users only)... It can be done through Plesk installer.
Note: More information can be found here: Software Requirements for Plesk Obsidian
-
Temporary install msmtp copmponent instead of Postfix. It can be done through Plesk installer or by using the command:
# plesk installer add --components msmtp
-
Add to the mariadb config file (Usually /etc/mysql/my.cnf) the string
innodb_fast_shutdown=0
in the [mysqld] section. -
Restart the DB server to apply changes:
# systemctl stop mariadb.service ; systemctl start mariadb.service
-
Update the current system to the latest available versions:
# apt-get update && apt-get upgrade
-
Remove all plesk-related repos from /etc/apt/sources.list.d/
-
Stop grafana service:
# systemctl stop grafana-server.service
Performing the dist-upgrade
-
Update source.list file and configure the repository for the OS release that is going to upgrade to:
# cat /etc/apt/sources.list
deb http://ftp.halifax.rwth-aachen.de/ubuntu/ focal main restricted universe
deb http://ftp.halifax.rwth-aachen.de/ubuntu/ focal-updates main restricted universe
deb http://ftp.halifax.rwth-aachen.de/ubuntu/ focal-security main restricted universe
deb http://autoinstall.plesk.com/PSA_18.0.33/ focal all
deb http://autoinstall.plesk.com/pool/PHP_7.1.33_96 focal all
deb http://autoinstall.plesk.com/pool/PHP_7.2.34_150 focal all
deb http://autoinstall.plesk.com/PHP73_17/ focal all
deb http://autoinstall.plesk.com/PHP74_17/ focal all
deb http://autoinstall.plesk.com/PHP80_17/ bionic all
deb https://packages.grafana.com/oss/deb stable main
deb [arch=amd64] http://autoinstall.plesk.com/PMM_0.1.11 focal all
deb [arch=amd64] http://autoinstall.plesk.com/NODE_0.0.2 all all
deb [arch=amd64] http://autoinstall.plesk.com/RUBY_0.0.2 focal allNote: The example above is for an installed version of Plesk Obsidian 18.0.33. The correct link for each installed version must be modified accordingly.
For example:http://autoinstall.plesk.com/PSA_x.y.z/
Whereas the versionx.y.z
is the current Plesk installed version, which can be found in the output of the command:# plesk -v
-
Update the repositories:
# apt-get update
-
Upgrade the kernel:
# apt-get install linux-generic
-
Update MariaDB to the next major version provided by vendor:
# apt-get install mariadb-server-10.3
-
Remove from the mariadb config file (Usually /etc/mysql/my.cnf) the string
innodb_fast_shutdown=0
in the [mysqld] section, added at the begining of this process. -
Install udev package:
# apt-get install udev
Warning: The udev package installation may fail on Ubuntu systems which may be needed to be solved manually. If that is the case, the following should be checked and applied:
-
At line 26 in the
/lib/systemd/system/systemd-udevd.service
file, the following string should be changed: -
From:
CONFIG_TEXT: ExecReload=udevadm control --reload --timeout 0
-
To:
CONFIG_TEXT: ExecReload=/bin/udevadm control --reload --timeout 0
-
And execute the following command:
# apt-get -f install
-
-
Install Systemd package:
# apt-get install systemd
-
Reboot the server to the new kernel:
# shutdown -r now
Note: This will help to avoid problems with services that already loaded old libc6/libstdc libraries
Warning: MariaDB won't start till the reboot is performed.
-
Remove packages that were installed by dependencies and not needed anymore:
# apt-get autoremove
-
Upgrade packages:
# apt-get upgrade
Note: If prompted, choose "latest" for LXD if this is unknown.
Note: When prompted, you should keep the previous version of
Spamassassin
configuration file. -
Remove packages that were installed by dependencies and not needed anymore:
# apt-get autoremove
-
Execute the dist-upgrade command:
# apt-get dist-upgrade
Note: At this point, plesk-mail-pc-driver, postfix, drweb, kav packages will be removed because there is already a vendor's Postfix that will be used in Ubuntu 20 (which version is lower that the psa-postfix installed in Ubuntu 18)
-
Remove packages that were installed by dependencies and not needed anymore:
# apt-get autoremove
-
Update Plesk to the next available version finishing the dist-upgrade process:
# plesk installer update
-
Check that all the Plesk components are installed and if not (Like for example in case there were components uninstalled like the ones in the dist upgrade step), select and re-install them again through the plesk installer along with Postfix which was replaced by msmtp at the beginning:
# plesk installer
-
Reboot the server:
# shutdown -r now
-
Check that Plesk and all its services are working.
Debian distributions
Warning: dist-upgrade
from Debian 8 to Debian 9 is supported by Plesk Onyx 17.8 version.
Warning: if PHP by OS vendor was updated from third-party sources prior to dist-upgrade, it may break webmail functionality.
Preparing server for upgrade
-
Create a full server backup. Before the upgrade, make a full server backup. Also notify the customers about upcoming downtime of one to three hours.
-
Consider to remove sources list backup files which might be left from the previous dist-upgrade:
/etc/apt/sources.list.saved_by_plesk_distupgrade
- /etc/apt/sources.list.d/50sw_autoinstaller.list.saved_by_plesk_distupgrade`
-
Run pre-upgrade helper script and prepare Plesk and the system for the upgrade:
# /opt/psa/bin/distupgrade.helper.deb8-deb9_pre.x64.sh
The script logs all its actions in
/var/log/plesk/install/plesk-distupgrade.log
.
Performing the dist-upgrade
-
Update source.list file and configure repository for the OS release that is going to upgrade to:
# cat /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main contrib non-free
deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free -
Update information about system packages:
# apt-get update
-
Upgrade the system:
# /opt/psa/bin/distupgrade.helper.deb8-deb9.x64.sh
This command will perform a complete upgrade of the system, install the newest available versions of all packages and resolve all possible dependency changes between packages in different releases.
During the upgrade the system might produce prompts like:
CONFIG_TEXT: Configuration file
/etc/mysql/my.cnf
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ?
Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** my.cnf (Y/I/N/O/D/Z) [default=N] ?
Choose to replace configuration files with a new one (answerY
).
Finalizing the upgrade
-
Run post-upgrade helper script:
# /opt/psa/bin/distupgrade.helper.deb8-deb9_post.x64.sh
Note: This script is already called during the execution of
/opt/psa/bin/distupgrade.helper.deb8-deb9.x64.sh
, run it to verify that everything was successfully done. Its actions are logged in/var/log/plesk/install/plesk-distupgrade.log
too. -
Reboot the server.
-
Check that Plesk and all its services are working.
Warning: dist-upgrade
from Debian 9 to Debian 10 is supported by Plesk Obsidian 18.0.30 version.
Warning: The dist-upgrade
process from Debian 9 to Debian 10 is supported with MariaDB scenario only.
Preparing server for upgrade
-
Create a full server backup. Before the upgrade, make a full server backup. Also notify the customers about upcoming downtime of one to three hours.
- Connect and perform the process connected as root or by using the
# su -
or# sudo su -
command. -
Uninstall unsupported components like docker, PHP below 7.0... (It can be done through Plesk installer).
Note: More information can be found here: Software Requirements for Plesk Obsidian
-
Temporary install msmtp copmponent instead of Postfix. It can be done through Plesk installer or by using the command:
# plesk installer add --components msmtp
-
Add to the mariadb config file (Usually /etc/mysql/my.cnf) the string
innodb_fast_shutdown=0
in the [mysqld] section. -
Restart the DB server to apply changes:
# systemctl stop mariadb.service ; systemctl start mariadb.service
-
Update the current system to the latest available versions:
# apt-get update && apt-get upgrade
-
Remove all plesk-related repos from /etc/apt/sources.list.d/
-
Stop grafana service:
# systemctl stop grafana-server.service
Performing the dist-upgrade
-
Update source.list file and configure the repository for the OS release that is going to upgrade to:
# cat /etc/apt/sources.list
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb http://deb.debian.org/debian/ buster-updates main contrib non-free
deb http://deb.debian.org/debian/ buster main contrib non-free
deb http://autoinstall.plesk.com/PSA_18.0.31/ buster all
deb http://autoinstall.plesk.com/debian/SITEBUILDER_17.8.12 all all
deb http://autoinstall.plesk.com/PHP71_17/ buster all
deb http://autoinstall.plesk.com/PHP72_17/ buster all
deb http://autoinstall.plesk.com/PHP73_17/ buster all
deb http://autoinstall.plesk.com/PHP74_17/ buster all
deb https://packages.grafana.com/oss/deb stable main
deb [arch=amd64] http://autoinstall.plesk.com/PMM_0.1.11 buster all
deb [arch=amd64] http://autoinstall.plesk.com/NODE_0.0.2 all all
deb [arch=amd64] http://autoinstall.plesk.com/RUBY_0.0.2 buster allNote: The example above is for an installed version of Plesk Obsidian 18.0.31. The correct link for each installed version must be modified accordingly.
For example:http://autoinstall.plesk.com/PSA_x.y.z/
Whereas the versionx.y.z
is the current Plesk installed version, which can be found in the output of the command:# plesk -v
-
Update the repositories:
# apt-get update
-
Upgrade the kernel:
# apt-get install linux-image-amd64
-
Update MariaDB to the next major version provided by vendor:
# apt-get install mariadb-server-10.3
-
Remove from the mariadb config file (Usually /etc/mysql/my.cnf) the string
innodb_fast_shutdown=0
in the [mysqld] section, added at the begining of this process. -
Reboot the server to the new kernel:
# shutdown -r now
Warning: MariaDB won't start till the reboot is performed.
-
Upgrade packages:
# apt-get upgrade
Note: When prompted, you should keep the previous version of
Rsyslog
configuration file.Note: When prompted, you should keep the previous version of
Spamassassin
configuration file. -
Remove packages that were installed by dependencies and not needed anymore:
# apt-get autoremove
-
Execute the dist-upgrade command:
# apt-get dist-upgrade
Note: At this point, there is a possibility that components are removed, like for example:
php7.0-curl
plesk-mail-pc-driver
postfix
psa-drweb-configurator
psa-spamassassin
which is because on Debian 10 vendor's postfix is used and its version is lower than postfix shipped by Plesk for Debian 9 -
Update Plesk to next available version finishing the dist-upgrade process:
# plesk installer update
-
Check that all the Plesk components are installed and if not (Like for example in case there were components uninstalled like the ones in the dist upgrade step), select and re-install them again through the plesk installer along with Postfix which was replaced by msmtp at the beginning:
# plesk installer
-
Reboot the server:
# shutdown -r now
-
Check that Plesk and all its services are working.
-
Use the following commands to regenerate web server as well as DNS configuration files if needed:
# plesk repair web
# plesk repair dns
Warning: Most of APS application will not work with PHP 7.x
Comments
73 comments
We are still waiting for this upgrade guide from Ubuntu 16 to 18.
I hope you can assist me with the following:
I am looking for the best way to proceed an update of Debian 7.11 with Plesk Onyx 17.5.3 to newer Debian and Plesk Obsidian.
I have already made sure that PHP 5.4 is not needed anymore and there are no more domains running on it.
As I have seen for Obsidian a minimum Debian 9 is needed and I think this version is fine as it is supported until 2022.
Plesk Onyx seems to run on Debian 8 and Debian 9.
I am specially interested in what is the best way going up to the best new version?
Would this be fine?
First dist upgrade to Debian 8 than to Debian 9 than Onyx to Obsidian?
Is there a distupgrade possibility within Plesk also?
I will have assistance of course, but it would be helpful getting more information about the order of the single steps (btw. corrections) to perform.
Many thanks
This is taking too long.. There has to be a upgrade from 16 to 18 and 18 to 20 aswel, cuz 18 is already outdated nowadays..
Helloooooo? What about the overdue and long-promised upgrade from Ubuntu 16 to 18?
Promised for the end of october. And we are still waiting for this upgrade guide from Ubuntu 16 to 18 in december.
Hi,
For all those waiting for the guide for newer operating systems, please be patient since we're finishing our tests and verifications that the procedure is safe to apply and won't break your servers :)
Ubuntu 16->18 distro-upgrade is going to be public very soon (during this week I believe).
For the procedure of Ubuntu 18->20 and Debian 9->10, to be honest, we're having some troubles with package management and dependencies while the distro-upgrade that without dirty hacks are difficult to overcome, something not suitable for inexperienced users.
Thanks for your patience.
As said yesterday, the guide is published now with Ubuntu 16->18 Distro upgrade procedure.
The other 2 (Ubuntu 18->20 and Debian 9->10) are on their way.
Thanks for your patience.
Has anyone tested 16 -> 18 yet?
Dirk Didn't go well for me at all. For starters, https://packages.grafana.com/oss/ubuntu doesn't even exist for sources.list. Per grafana, it should be https://packages.grafana.com/oss/deb so I'm not convinced this process was very well vetted. Step #7 isn't super clear. In my instance, I have 5 separate URLs in my plesk.list. I assume they mean the PSA_* URL. I used their example and it immediately failed because of libcurl3. Installing libcurl4 proceeded to update a ton of packages. Ultimately it had issues with mariadb and it seems it wanted to update the database.
I honestly just got fed up with how abysmal this upgrade process is, how long it took to get these instructions, I've got very little faith in the product or their ability to provide a safe upgrade path. I wasn't about to attempt this again from 18.04 to 20.04 because that sounds like even more of a train wreck. I took a complete server backup prior to attempting to upgrade. I've been meaning to reorganize a few things so I'm taking the opportunity to just install 20.04 fresh and reinstall Plesk on top of that. Hopefully my backup imports smoothly but again, I've very little faith at this point.
I implore the Plesk team to really make this process a priority in the future.
Yes, Patrick, you are absolutely right, the repositories for Grafana are wrong and should be as you correctly pointed out. Thanks for bringing this to my attention! I've proceeded to perform the change in the guide and set it properly, it should be right now.
As for the rest of the problems/concerns, unfortunately, there is no easy way to perform such a process upgrading the distribution thus, this is as well the main reason why it is not recommended and, what we recommend instead, is to perform a migration. The result should be cleaner and more pleasant.
The recommended upgrade path using the migration guide is an economical disaster, to say the least.
Only because plesk fell short on all promises, we had to go with the migration guide a couple of months ago. We had so much pressure from our clients, that we had to upgrade, especially because many packages had been at their end of life. One of the reason is that not all ubuntu packages have long time support. Anyway. The migration took us weeks to prepare and complete. The migration assistant is so poorly build and has so many bugs, that many things are not getting migrated even though they are part of plesk itself. Worse than that is of course all the other stuff. If you are using a server for many years for many clients, you will customise it to your and your clients' needs. Plesk is just offering basic packages (web, apps, dns, mail) and it is obvious that admins have to tweak the server around plesk.
The migration took hours, which was downtime, and even with weeks of preparation we still had to fix so many things afterwards. The customers were annoyed and we too.
And I just want to repeat myself: the migration was an economical catastrophe for us. Just make the calculation for yourself. How many client you have to have to get paid for this immense effort and loss of confidence? A migration is the worst upgrade path and should not be the recommended one!
So far plesk has not delivered anything they promised, not even a good nor expectable excuse.
Thanks for all the comments. This makes me stop to attempt the upgrade. I started following the 16 -> 18 guide above but step 7 is so super unclear that I wonder how this could end up in a guide in the first place.
I also haven't tried yet, because of step #7. Could anyone make this a little more precise?
Please sign in to leave a comment.