• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Ubuntu dist-upgrade 18.04.6 LTS to 20/22

heydemar

Basic Pleskian
Server operating system version
18.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.52
Good evening,

I am facing a challenge to upgrade my production Ubuntu server from version 18.04.6 LTS to 20 or 22.

The installed version is as follows:
Plesk Obsidian v18.0.52_build1800230516.19 Ubuntu 18.04.6 LTS

I am in the comfortable situation of being able to mesh a snapshot of the machine.
And have also found the following instructions from Plesk. However, some steps I do not understand.
Attached are the instructions for the update:

Point 2: Remote management module
What is meant by this?
Point 4: Uninstall unsupported components
How and which ones have to be installed?
....
.....
.........

Does anyone have experience with the instructions and can say something about such an update.
My alternative is to rent another server and do a migration with the Plesk Migration Plugin, but I would prefer an update to 20 or 22.
 
Point 2: Remote management module
What is meant by this?
A remote management module would be anything you can use to access your server in case the SSH connection to your server gets lost. Usually this means a KVM console or a virtual terminal. That way you still have an option to access your server.

Point 4: Uninstall unsupported components
How and which ones have to be installed?
Some components used in Plesk on Ubuntu 18.04 might no longer be supported or are not yet supported on newer Ubuntu version. For example Watchdog is no longer supported in newer Ubuntu version. You'll find more information on those limitation here for Ubuntu 20.04 and here for Ubuntu 22.04.

Hope this helps a bit.
 
Last edited:
Thank you Kaspar,
that helps me a bit. Which path is taken in the normal case? Rather the migration or still the way with a dist-upgrade
With the possibility of the snapshot can happen quite little.
Is there also the possibility to work with an export-import where all Plesk settings are exported and imported?
 
~~ Which path is taken in the normal case? Rather the migration or still the way with a dist-upgrade
With the possibility of the snapshot can happen quite little.
Is there also the possibility to work with an export-import where all Plesk settings are exported and imported?
IF this helps a little:
We did Plesk Migration for Ubuntu 18.04 LTS > Ubuntu 20.0 4LTS but then switched to Dist-Upgrade for Ubuntu 20.04 LTS > Ubuntu 22.0 4LTS
You can read the thread here:
Having done both and with the benefit of hindsight, we'd now always go for Dist-Upgrade. Your setup is different however, so your final decision may vary
 
I have no experience with Ubuntu and dist-upgrades. So there is little advice I can give you in that regard. However since you mentioned you are able to make snapshots you might be able to clone you server as well? That would allow you to do a test run with dist-upgrading on a cloned server.

Other than that @learning_curve's advice seems really useful.
 
Last edited by a moderator:
Thanks for all the information I've been working through, including the thread Question -
Ubuntu x86_64 20.04 LTS > Ubuntu x86_64 22.04 LTS Dist-Upgrade / Obsidian 18.04.48

Would it be a problem for the community if we went through every point from the Plesk guide once!!!? :D
Maybe then the master manual will be created ;)

1.Create a full server backup. Before the upgrade, make a full server backup (which includes a full backup of all the databases). Also, notify the customers about upcoming downtime of one to three hours.
Check!

2. Remote management module must be installed on the server (This is because, in some tests, sshd service could not be started during the process)
Check!

3. Connect and perform the process connected as root or by using the # su - or # sudo su -command.
Check!
Its only copy and paste the Command # su - oder # sudo su -

4. Uninstall unsupported components like 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
Can you do this via the Plesk GUI or only via Commandos via SSH?
What are the commandos for this uninstallation?


5. Temporary install msmtp component instead of Postfix. It can be done through Plesk installer or by using the command:
plesk installer add --components msmtp --source Index of /
Check!
Its only copy and paste the Command

6. Add to the mariadb config file /etc/mysql/mariadb.conf.d/50-server.cnf the string innodb_fast_shutdown=0 in the [mysqld] section. In case MySQL is installed, add the string into /etc/mysql/my.cnf in the [mysqld] section.
Check!
Looks like:

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]
innodb_fast_shutdown=0

7. Restart the DB server to apply changes:
systemctl restart mariadb || systemctl restart mysql || systemctl restart mysqld
Check!
Its only copy and paste the Command

8. Make sure that update-manager-core package is installed:
apt-get install update-manager-core
Check!
Its only copy and paste the Command

9. Update the current system to the latest available version:
apt-get update && apt-get upgrade
Check!
Its only copy and paste the Command

10. Remove all plesk-related repos from /etc/apt/sources.list.d/. For example, you can archive them by removing originals using the next command:
tar -cvf ~apt-sources.tar /etc/apt/sources.list.d/plesk* --remove-files
Check!
Its only copy and paste the Command

11. Stop grafana service:
systemctl stop grafana-server.service
Check!
Its only copy and paste the Command

12. Update the file sources.list and configure the repository for the OS release that is going to upgrade to:

cat /etc/apt/sources.list
deb Index of /ubuntu focal main restricted universe
deb Index of /ubuntu focal-updates main restricted universe
deb Index of /ubuntu focal-security main restricted universe
deb focal all
deb Index of /pool/PHP_7.1.33_96 focal all
deb Index of /pool/PHP_7.2.34_150 focal all
deb Index of /PHP73_17 focal all
deb Index of /PHP74_17 focal all
deb Index of /PHP80_17 focal all
deb Index of /grafana/deb stable main
deb [arch=amd64] Index of /PMM_0.1.11 focal all
deb [arch=amd64] Index of /NODE_0.0.2 all all
deb [arch=amd64] Index of /RUBY_0.0.2 focal all
Note: The example above is for an installed version of Plesk Obsidian 18.0.37. The correct link for each installed version must be modified accordingly. "sources.list" should be replaced with the contents presented above in the article. Only the highlighted line is to be updated/edited.
For example: http://autoinstall.plesk.com/PSA_x.y.z/
Whereas the version x.y.z is the current Plesk installed version, which can be found in the output of the command:
# plesk -v

What do I have to do here ?
What are the commandos for this uninstallation?


13. Update the repositories:
apt-get update
Check!
Its only copy and paste the Command

14 Upgrade the kernel:
apt-get install linux-generic
Check!
Its only copy and paste the Command

15. Update MariaDB to the next major version provided by the vendor:
apt-get install mariadb-server-10.3
Check!
Its only copy and paste the Command in my case i have installed MarianDB 10.6 and my Command is apt-get install mariadb-server-10.7??

Warning: MariaDB/MySQL will not start until the next reboot is performed.
16. In the mariadb config file /etc/mysql/mariadb.conf.d/50-server.cnf remove the string innodb_fast_shutdown=0 in the [mysqld] section, added at the beginning of this process. In case MySQL is installed, remove the string from /etc/mysql/my.cnf in the [mysqld] section.
Check!

17. Install udev package:
apt-get install udev
In Case of an error:
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:
  1. At line 26 in the /lib/systemd/system/systemd-udevd.service file, the following string should be changed:
  2. From:
    ExecReload=udevadm control --reload --timeout 0
  3. To:
    ExecReload=/bin/udevadm control --reload --timeout 0
  4. And execute the following command:
    apt-get -f install
Check!
Its only copy and paste the Command

18. Install Systemd package:
apt-get install systemd
Check!
Its only copy and paste the Command

19. Reboot the server to the new kernel:
shutdown -r now
Check!
Its only copy and paste the Command

20. Remove packages that were installed by dependencies and not needed anymore:
apt-get autoremove
Check!
Its only copy and paste the Command

21. Upgrade packages:
apt-get upgrade
Check!
Its only copy and paste the Command

22. Remove packages that were installed by dependencies and not needed anymore:
apt-get autoremove
Check!
Its only copy and paste the Command

23. Execute the dist-upgrade command:
apt-get dist-upgrade
Check!
Its only copy and paste the Command

24. Remove packages that were installed by dependencies and not needed anymore:
apt-get autoremove
Check!
Its only copy and paste the Command

25. Update Plesk to the next available version finishing the dist-upgrade process:
plesk installer update
Check!
Its only copy and paste the Command

26. Fix the Bind DNS server defaults file:
cp /etc/default/bind9 /etc/default/named
What does it mean?

27. Check that all Plesk components(Dovecot, SpamAssassin, Mailman) are installed as needed. e.g. In case there were components uninstalled at 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
Check!
Its only copy and paste the Command

28. Run the repair command below to run all needed upgrade scripts:
plesk repair installation
Why?

29. Reboot the server:
shutdown -r now
Check!
Its only copy and paste the Command
 
And another question, I also have the backup manager running in Plesk.
Could I also get me a new server vesorgen with current Ubuntu 22 and Plesk and simply import the backup?
There are all customers and also all settings in Plesk?

1692340693145.png
 
The limits are practically the same, however some entries obviously only match a migration situation. Still such things like the webmail address books are not restored, subscription backups are not restored etc.
 
Thanks!
Can someone help me with point 4, 12, 15, 26 and 28 from the Plesk manual?
@heydemar FWIW

Point 4 in your list. The Plesk article: Dist-upgrade from Ubuntu 20 (Focal Fossa) to Ubuntu 22 (Jammy Jellyfish), clearly shows the CLI commands for this step. That's what we used as guidance on the servers we did this on.

Point 12 in your list. Again, The Plesk article: Dist-upgrade from Ubuntu 20 (Focal Fossa) to Ubuntu 22 (Jammy Jellyfish), clearly shows the CLI commands for this step. That's what we used as guidance on the servers we did this on. However, in addition, we made additional changes to the /etc/apt/sources.list THIS Plesk article is a useful reference, IF you have issues, but, we used Ubuntu OS data / info to finalize our /etc/apt/sources.list for Ubuntu 22.04 LTS on the servers we did this on, as the info, is still missing from that article.

Point 15 in your list. This is your own decision. MariaDB 10.6 that you're currently using has a 5 year LTS as does MariaDB 10.11 that we are using. Several MariaDB releases (including MariaDB 10.7 that you have mentioned, which in now EOL anyway) only have a 1 year service schedules.

Here's the current MariaDB summary of this:

Release schedule

MariaDB Foundation ensures that MariaDB Server has a steady cadence of releases. Until MariaDB Server 10.6, MariaDB Server had about one stable major release every year. Now there are multiple short term releases each year, in addition to less frequent long-term releases. The current maintained versions are: 10.4, 10.5, 10.6, 10.11 (maintained for 5 years), 10.9, 10.10, 11.0, 11.1 (maintained for one year), and the development version is 11.2. Each stable version receives bug-fixes and security fixes periodically.

Point 26 in your list. This is a requirement in the Dist-upgrade from Ubuntu 18 (Bionic Beaver) to Ubuntu 20 (Focal Fossa) Plesk article, but we achieved this via Plesk Migration NOT Dist-upgrade. It's NOT included / required within the Dist-upgrade from Ubuntu 20 (Focal Fossa) to Ubuntu 22 (Jammy Jellyfish) article which we did use for guidance on the servers we did this on.

Somebody who has run the Dist-upgrade from Ubuntu 18 (Bionic Beaver) to Ubuntu 20 (Focal Fossa) and/or Plesk Support can answer this for you.

Point 28 in your list. You've asked "why" One answer might be "why not?" as this instruction in the Plesk article(s) is self explanatory" :p
 
Great, many thanks. I have now proceeded as follows. I bought a new VPS and put a full backup there. This worked without any problems. Unfortunately, I only then noticed that MarianDB 10.6.12 is installed. I still have to update that to the 10.11. Think I get that without problems ;)

In the aftermath I will then tackle the dist-upgrade on the other VPS. The step with a new VPS was then but more reassuring. I will keep you up to date.

Is there anything to consider with the MarianDB when jumping from 10.6.12 to 10.11 ?
 
I have test the MarianDB Update on another VPS:

root@vps4:~# apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
software-properties-common is already the newest version (0.99.22.7).
The following packages were automatically installed and are no longer required:
libboost-iostreams1.71.0 libclass-accessor-perl libio-string-perl libparse-debianchangelog-perl python3-requests-unixsocket
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 681 not upgraded.
N: Ignoring file 'mariadb.list.old_1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
root@vps4:~# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
Executing: /tmp/apt-key-gpghome.QzMEVQezO3/gpg.1.sh --fetch-keys https://mariadb.org/mariadb_release_signing_key.asc
gpg: requesting key from 'https://mariadb.org/mariadb_release_signing_key.asc'
gpg: key F1656F24C74CD1D8: "MariaDB Signing Key <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
root@vps4:~# curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.11
# [info] Checking for script prerequisites.
# [warning] Found existing file at /etc/apt/sources.list.d/mariadb.list. Moving to /etc/apt/sources.list.d/mariadb.list.old_2
# [info] MariaDB Server version 10.11 is valid
# [info] Repository file successfully written to /etc/apt/sources.list.d/mariadb.list
# [info] Adding trusted package signing keys...
# [info] Running apt-get update...
# [info] Done adding trusted package signing keys
root@vps4:~# apt-get update
Hit:2 Index of /ubuntu jammy InRelease
Hit:3 Index of /ubuntu jammy-security InRelease
Hit:4 Index of /mariadb/repo/10.7/ubuntu/ jammy InRelease
Hit:5 Index of /ubuntu jammy-updates InRelease
Hit:1 Tools/ubuntu/ - MariaDB focal InRelease
Hit:6 Index of /ubuntu jammy-backports InRelease
Get:7 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu focal InRelease [7,767 B]
Get:8 https://dlm.mariadb.com/repo/maxscale/latest/apt focal InRelease [9,344 B]
Fetched 17.1 kB in 2s (8,233 B/s)
Reading package lists... Done
N: Ignoring file 'mariadb.list.old_1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'mariadb.list.old_2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
root@vps4:~# apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mariadb-server is already the newest version (1:10.11.5+maria~ubu2004).
The following packages were automatically installed and are no longer required:
libboost-iostreams1.71.0 libclass-accessor-perl libio-string-perl libparse-debianchangelog-perl python3-requests-unixsocket
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 681 not upgraded.
N: Ignoring file 'mariadb.list.old_1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'mariadb.list.old_2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
root@vps4:~# sed -i 's/bind-address = ::ffff:127.0.0.1/bind-address = 127.0.0.1/g' /etc/mysql/my.cnf
root@vps4:~# service mariadb start
root@vps4:~# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
This installation of MariaDB is already upgraded to 10.11.5-MariaDB.
There is no need to run mysql_upgrade again for 10.11.5-MariaDB.
You can use --force if you still want to run mysql_upgrade
root@vps4:~# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin --force
Phase 1/8: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.roles_mapping OK
mysql.servers OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
Phase 2/8: Installing used storage engines... Skipped
Phase 3/8: Running 'mysql_fix_privilege_tables'
Phase 4/8: Fixing views
mysql.user OK
Phase 5/8: Fixing table and database names
Phase 6/8: Checking and upgrading tables
Processing databases
sys
sys.sys_config OK
Phase 7/8: uninstalling plugins
Phase 8/8: Running 'FLUSH PRIVILEGES'
OK
root@vps4:~# service mariadb restart
root@vps4:~# plesk bin service_node --update local
The service node 'local' was successfully updated.
root@vps4:~# plesk sbin packagemng -sdf

But in my Plesk GUI i see:

1692599095866.png
 
@heydemar you've got the right version installed. The mismatch of the version displayed does not affect usage/functionality. But if it bothers you, you can run the following command to manually change MariaDB version shown in Plesk.

Code:
sudo plesk db "update DatabaseServers set server_version = '10.11.5' where server_version = '10.6.8'";
 
On my new Plesk Server:
root@vps2:~# telnet smtp.ionos.de 25
Trying 213.165.67.97...
You cannot send emails from Plesk because outbound connections on TCP port 25 is blocked. Check the firewall settings or contact your hosting provider. If you are sure that the ports are already open, Plesk can recheck them.
Start the recheck

In my Maillog:
Aug 21 12:45:37 vps2 postfix/smtp[106511]: connect to mx00.ionos.de[212.227.15.41]:25: Connection timed out
Aug 21 12:45:37 vps2 postfix/smtp[106512]: connect to mx00.ionos.de[212.227.15.41]:25: Connection timed out
Aug 21 12:46:07 vps2 postfix/smtp[106511]: connect to mx01.ionos.de[217.72.192.67]:25: Connection timed out

My hosting provider has enabled port 25 outbound. I also talked to him on the phone, he can't find any error.
I have not installed any firewall extension in Plesk. What else can it be?
 
Back
Top