Question
How to upgrade Firewall configuration from Plesk 17.8.11 to Plesk >= 18.0.55?
Answer
These instructions are actually applicable to any upgrade to Plesk >= 18.0.55 in order to preserve Firewall configuration when upgrading from Plesk package to extension, but technically we don't support upgrades from other versions
-
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
/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 -
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
-
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.
Comments
1 comment
Getting an error in the last step:
# plesk bin extension --install firewall
Index is under processing now
exit status 3
Could you please support?
Please sign in to leave a comment.