• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Plesk Update 18.0.34 to 18.0.57 Database 'psa' not found

musa.sc

New Pleskian
Server operating system version
Ubuntu 18.04.6 LTS
Plesk version and microupdate number
Version 18.0.34 Update #2
Hello,

I wanted to update Plesk Obsidian 18.0.34 to 18.0.57 via the web updater. So far so good.
But then the installation was aborted (Trying to find Plesk database psa... not found - see the log file).

Now my question is, theoretically I could restore the psa database from the backup - right?
But what happens next? Does the updater recognize that parts of the update have already been completed?

The hosted websites are running, but the Plesk interface is simply not available. It's also a productive server where I can't afford long downtimes.

Thanks

-----------------------------
Log-File
-----------------------------
START Bootstrapper 18.0.57 prep-install for BASE AT Sun Dec 31 14:41:58 CET 2023

**** Product prep-install started.
Create user 'psaadm' and group 'psaadm'
Group 'psaadm' already exists
Checking for the user 'psaadm'...
User 'psaadm' already exists
Create group 'swkey-data'
Group 'swkey-data' already exists
Trying to add supplementary group 'swkey-data' for user 'psaadm'... already there
Create group 'psaserv'
Group 'psaserv' already exists
Trying to add supplementary group 'psaserv' for user 'psaadm'... already there
Create group 'psacln'
Group 'psacln' already exists
Trying to got legacy variables... done
config updated
===> Updated /etc/psa/psa.conf
Trying to save legacy variables... done
Checking that /opt/psa/bin/chrootsh registered as login shell...

===> Performing safe prep-install database actions

===> Upgrading database
Trying to start service mysql... active
done
Trying to establish test connection... connected
done
Trying to find Plesk database psa... not found
ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'


ERROR while trying to run the following SQL query: SELECT val FROM misc WHERE param = 'aps_database'

Trying to backup MySQL database... done
MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.18.0.34-18.0.57.20231231-144159.dump.gz
ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'


ERROR while trying to run the following SQL query: SELECT val FROM misc WHERE param = 'aps_database'

===> Cumulative Plesk database upgrade (revertable stage) has been started.
ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'

ERROR while trying to run the following SQL query: SHOW TABLES LIKE 'misc'

===> Restoring database from backup /var/lib/psa/dumps/mysql.preupgrade.18.0.34-18.0.57.20231231-144159.dump.gz

**** Product prep-install for BASE failed.

***** problem report *****
ERROR while trying to run the following SQL query: SELECT val FROM misc WHERE param = 'aps_database'
***** problem report *****
ERROR while trying to run the following SQL query: SELECT val FROM misc WHERE param = 'aps_database'
***** problem report *****
ERROR while trying to run the following SQL query: SHOW TABLES LIKE 'misc'
STOP Bootstrapper 18.0.57 prep-install for BASE AT Sun Dec 31 14:42:15 CET 2023
 
Yes, you can restore the psa database from the previous backup. You could then either try to run plesk repair installation or retry the upgrade.
 
I just tried to update again and as expected with the same error as described above. So far so good.

I Then restored the PSA database with:

Code:
# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin

And then carry out a plesk repair installation, but unfortunately that was not possible because plesk was no longer found and the process could not be started.

Code:
# plesk repair installation
# -bash: /usr/sbin/plesk: No such file or directory
 
If more than just the psa database is missing, a reinstallation of Plesk will be necessary. If Plesk has been uninstalled or major components of it have been uninstalled, it can no longer be used unless reinstalled.
 
Everything essential was uninstalled during the update, that's correct so far.

Then discussed when reinstalling the current version (after installing the components: PHP, mySQL and Apache2).
So at least the websites continued to work.

Now the question is: What is the best way to proceed?

Update > Error > Reinstallation (in the existing partial update)
or
Complete uninstall > reinstall from zero
 
If it is unknown what the exact situation is on the existing server with services, Plesk and content, it probably won't be possible to get back to a stable system. I recommend to setup a new server, freshly install Plesk on it, then migrate the websites to it.
 
The server has been running for 6 years now and has had several update cycles. So a new installation would really make sense.
With my provider I can also perform an automatic reinstallation on Ubuntu 22.04 LTS 64bit + Plesk Obsidian.

Now my question about this:
If I use the Plesk Backup Manager to create a complete backup of Plesk, I can restore it after the reinstallation and all settings (costumers, domains, subscriptions, emails, etc.) should be transferred to the new system.
 
All important settings will be restored, but some things like webmail email address books cannot be backed up/restored.
 
Thanks for your answer and advice.
I'll just test it out, there are almost no other options and then my system will be up to date again :)
 
I'm reinstalled my complete system and its all running well again. Time was around 6h with all backups forward and back, new installation and configuration.
 
Back
Top