Backup and restore Plesk database
This post explains how to backup and restore Plesk database. It is very important to make a backup of psa database prior making any changes to it. If anything went wrong we can easily revert the changes using the backup.
The following command is used to backup a database in Plesk:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin DB_NAME > DB_BAKUP.sql
Replace DB_NAME with Database Name and DB_BAKUP.sql with Database Backup File Name.
So, you can use the below command to backup the Plesk database.
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > psa.sql
You can restore any database in Plesk using the following command:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin DB_NAME < DB_BAKUP.sql
Restore Plesk Database:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa < psa.sql
If you like this post and wish to receive more articles from us, please like our FB page: Button
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at firstname.lastname@example.org