How can I restore the Plesk psa database from a backup?

The following example shows how to restore the mysql.preupgrade.dump.gz backup file.

gunzip /var/lib/psa/dumps/mysql.preupgrade.dump.gz

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e”DROP DATABASE psa;”

mysql -uadmin -p`cat /etc/psa/.psa.shadow` < /var/lib/psa/dumps/mysql.preupgrade.dump

Actually standard daily backup file includes three databases:

* psa

* horde

* mysql

That is why the following error message will appear when you performed the latest command:

ERROR 1050 at line 3165: Table ‘horde_categories’ already exists

This happens because only the “psa” database was restored. However, if you want to restore all

three databases, then you have to delete them using “DROP DATABASE” sql command.

Also, make sure that you are always restoring the latest backup file.

Published
Categorized as Plesk

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.