Plesk upgrade failed: Previous product version is xxxx, but previous database version is xxxxx.

Created:

2016-11-16 12:38:51 UTC

Modified:

2017-04-24 11:13:46 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Plesk upgrade failed: Previous product version is xxxx, but previous database version is xxxxx.

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

  • An upgrade to Plesk 12.5 from previous version failed. Execution of bootstrapper results 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 installer utility.

Cause

Plesk database was not upgraded or some parameters in database was not updated.

Resolution

  1. Find the cause of upgrade failure and eliminate it. Check upgrade log files in directory /var/log/plesk/install/ and apply necessary actions.

  2. Check Plesk database for errors by the following command:

    # plesk repair db -n
  3. Check Plesk database version in psa.misc and apsc.meta tables by the following commands:

    # plesk db "SELECT * FROM misc WHERE param='version'"

    # plesk db "SELECT * FROM apsc.meta_info WHERE param='db_version'"
  4. Try to continue upgrade. Start plesk installer and upgrade the product, or, if Plesk 12 is already shown as installed, install updates to its components.

  5. If plesk installer fails or Plesk does not work afterward, try to repair it:

    # /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/bootstrapper.sh repair
  6. 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-12.5.30.20140723-022543.dump.gz | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin
    # zcat mysql.preupgrade.apsc.11.5.30-12.5.30.20140723-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 .

Have more questions? Submit a request
Please sign in to leave a comment.