An upgrade to
Plesk 12.5from previous version failed. Execution of
bootstrapperresults the following error:
# /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/bootstrapper.sh repair Trying to find psa database... version is 011005030 DATABASE ERROR!!! Previous product version is 12.5.30, but previous database version is 011005030. ... ERROR while trying to check database version
- The error above appears when trying to run
Plesk database was not upgraded or some parameters in database was not updated.
Find the cause of upgrade failure and eliminate it. Check upgrade log files in directory
/var/log/plesk/install/and apply necessary actions.
Check Plesk database for errors by the following command:
# plesk repair db -n
Check Plesk database version in
apsc.metatables by the following commands:
# plesk db "SELECT * FROM misc WHERE param='version'" # plesk db "SELECT * FROM apsc.meta_info WHERE param='db_version'"
Try to continue upgrade. Start
plesk installerand upgrade the product, or, if Plesk 12 is already shown as installed, install updates to its components.
plesk installerfails or Plesk does not work afterward, try to repair it:
# /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/bootstrapper.sh repair
If repair didn't help or failed, rollback Plesk database and Plesk version files to their pre-upgrade state, and rerun upgrade procedure.
For example, if server was upgraded from Plesk 11.5.30 to 12.5.30 on CentOS 6, the following commands should be executed:
# echo "11.5.30 CentOS 6 00000000.00" > /usr/local/psa/version # echo "11.5.30 CentOS 6 00000000.00" > /usr/local/psa/core.version
Note: It is important to always save database before making any actions on it. Backup of all databases can be created by the following command:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` -f --all-databases > /root/all_databases_backup`date +%F-%s`.sql
Check where MySQL dumps are located:
[root@server ~]# grep DUMP_D /etc/psa/psa.conf DUMP_D /var/lib/psa/dumps
Go to the directory where MySQL dumps are located and restore databases:
# cd /var/lib/psa/dumps # zcat mysql.preupgrade.11.5.30-188.8.131.5240723-022543.dump.gz | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin # zcat mysql.preupgrade.apsc.11.5.30-184.108.40.20640723-022544.dump.gz | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin
Warning: Always carefully look at versions and timestamp of pre-upgrade dump archives. It is important to restore correct pre-upgrade dumps. There might have been several failed attempts to upgrade and later dumps already contain half-upgraded database.
# /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/bootstrapper.sh rerun
After upgrade has been completed, it is important to verify that all components were upgraded by going to Tools & Settings > Updates & Upgrades.