Plesk

How to upgrade Firewall configuration from Plesk Onyx to Plesk Obsidian?

Question

How to upgrade Firewall configuration from Plesk 17.8.11 to Plesk >= 18.0.55?

Answer

  1. Perform Plesk upgrade as usual. This will remove the Firewall component without installing the Firewall extension automatically.

  2. Connect to the server via SSH (if upgrade was performed via graphical interface) and select the last pre-upgrade DB dump (change the directory if it was customized in /etc/psa/psa.conf):

    # grep '^DUMP_D' /etc/psa/psa.conf
    DUMP_D /var/lib/psa/dumps

    # ls -t /var/lib/psa/dumps/mysql.preupgrade.17.8.11* | head -n1
    /var/lib/psa/dumps/mysql.preupgrade.17.8.11-18.0.55.20230721-105728.dump.gz

  3. Restore the removed Firewall DB tables using output from the previous step as a path to dump file:

    # zcat /var/lib/psa/dumps/mysql.preupgrade.17.8.11-18.0.55.20230721-105728.dump.gz | sed -n -e '/^USE / p' -e '/^DROP TABLE IF EXISTS `module_firewall_objects`;/,/^UNLOCK TABLES;/ p' -e '/^DROP TABLE IF EXISTS `module_firewall_rules`;/,/^UNLOCK TABLES;/ p' | plesk db

  4. Make sure the Firewall extension is not installed. The following output should be returned:

    # plesk bin extension --uninstall firewall || :
    The extension firewall is not installed.

  5. Install the Firewall extension:

    # plesk bin extension --install firewall
    The extension was successfully installed.

Exit mobile version