How to upgrade Firewall configuration from Plesk 17.8.11 to Plesk >= 18.0.55?
Perform Plesk upgrade as usual. This will remove the Firewall component without installing the Firewall extension automatically.
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
# grep '^DUMP_D' /etc/psa/psa.conf
# ls -t /var/lib/psa/dumps/mysql.preupgrade.17.8.11* | head -n1
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-220.127.116.1130721-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
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.
Install the Firewall extension:
# plesk bin extension --install firewall
The extension was successfully installed.