How to Upgrade Debian 9 to Debian 10 with Plesk Obsidian <18.0.30

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,134
Reaction score
57
Points
48
Follow these easy step-by-step guide to perform dist-upgrade from Debian 9 to Debian 10 on your Plesk Obsidian server:

⚠ 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
  1. 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.
  2. Connect and perform the process connected as root or by using the # su - or # sudo su -command.
  3. 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
  4. Temporary install msmtp component instead of Postfix. It can be done through Plesk installer or by using the command:
    Bash:
    # plesk installer add --components msmtp
  5. Add to the mariadb/mysql config file (Usually /etc/mysql/my.cnf) the string innodb_fast_shutdown=0 in the [mysqld] section.
    innodb_fast_shutdown:
    • Description: The shutdown mode.
      • 0 - InnoDB performs a slow shutdown, including full purge (before MariaDB 10.3.6, not always, due to MDEV-13603) and change buffer merge. Can be very slow, even taking hours in extreme cases.
      • 1 - the default, InnoDB performs a fast shutdown, not performing a full purge or an insert buffer merge.
      • 2, the InnoDB redo log is flushed and a cold shutdown takes place, similar to a crash. The resulting startup then performs crash recovery. Extremely fast, in cases of emergency, but risks corruption. Not suitable for upgrades between major versions!
      • 3 (from MariaDB 10.3.6) - active transactions will not be rolled back, but all changed pages will be written to data files. The active transactions will be rolled back by a background thread on a subsequent startup. The fastest option that will not involve InnoDB redo log apply on subsequent startup. See MDEV-15832.
    • Commandline: --innodb-fast-shutdown[=#]
    • Scope: Global
    • Dynamic: Yes
    • Data Type: numeric
    • Default Value: 1
    • Range: 0 to 3 (>= MariaDB 10.3.6), 0 to 2 (<= MariaDB 10.3.5)
  6. Restart the DB server to apply changes:
    Bash:
    # systemctl stop mariadb.service ; systemctl start mariadb.service
  7. Update the current system to the latest available versions:
    Bash:
    # apt-get update && apt-get upgrade
  8. Remove all plesk-related repos from /etc/apt/sources.list.d/. For example, you can archive them by removing originals using the next command:
    Bash:
    # tar -cvf ~apt-sources.tar /etc/apt/sources.list.d/plesk* --remove-files
  9. Stop grafana service:
    Bash:
    # systemctl stop grafana-server.service
Performing the dist-upgrade
  1. Update /etc/apt/source.list file and configure the repository for the OS release that is going to upgrade to:
    Bash:
    # cat /etc/apt/sources.list
    Rich (BB code):
    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.36/ 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 all
    📘 Note: The example above is for an installed version of Plesk Obsidian 18.0.36. 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:
    Bash:
    # plesk -v
  2. Update the repositories:
    Bash:
    # apt-get update
  3. Upgrade the kernel:
    Bash:
    # apt-get install linux-image-amd64
  4. Update MariaDB to the next major version provided by the vendor:
    Bash:
    # apt-get install mariadb-server-10.3
  5. Remove from the mariadb/mysql config file (Usually /etc/mysql/my.cnf) the string innodb_fast_shutdown=0 in the [mysqld] section, added at the beginning of this process.
  6. Reboot the server to the new kernel:
    Bash:
    # shutdown -r now
    Warning: MariaDB/MySQL won't start till the reboot is performed.
  7. Upgrade packages:
    Bash:
    # 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.
  8. Remove packages that were installed by dependencies and not needed anymore:
    Bash:
    # apt-get autoremove
  9. Execute the dist-upgrade command:
    Bash:
    # 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
  10. Update Plesk to next available version finishing the dist-upgrade process:
    Bash:
    # plesk installer update
  11. 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:
    Bash:
    # plesk installer
  12. Reboot the server:
    Bash:
    # reboot
  13. Check that Plesk and all its services are working.
  14. Use the following commands to regenerate web server as well as DNS configuration files if needed:
    Bash:
    # plesk repair web
    # plesk repair dns
If your server doesn't run a named service (i.e. bind9), you'll get some errors related with bind9 during the last part of dist-upgrade, run this command to fix it: apt-get --purge remove bind9 package plesk-dns-bind-driver will be also removed by dependencies (if it was installed) and then you can remove /etc/bind/rndc.conf manually if needs be.
Reference:
  • https://support.plesk.com/hc/en-us/articles/213410369-How-to-perform-dist-upgrade-procedure-on-Linux-server-with-Plesk-
  • https://mariadb.com/kb/en/innodb-system-variables/#innodb_fast_shutdown
  • https://talk.plesk.com/threads/bind9-prevent-to-upgrade.360970/#post-894001
I hope this article work for you, let me know if you have questions by commenting down below 👇
Cheers 🍺
 
 Short URL:
Back
Top