Question
How to manually back up or restore client MySQL/MariaDB database in Plesk for Windows?
Answer
-
Connect to Plesk server via RDP;
- Open command prompt as Administrator
- Back up client database:
C:> "%plesk_dir%"MySQLbinmysqldump -uadmin -p -P3306 client_base > client_base.dump
where:
3306 - port for MySQL or MariaDB server;
client_base - database name;
client_base.dump - name of database backup.Note: MySQL or MariaDB admin password will be asked during the commands execution. In case it is not known, it can be safely changed at Tools & Settings > Database Servers > localhost (default for MySQL or MariaDB) on port 3306.
-
Restore the database:
C:> "%plesk_dir%"MySQLbinmysql -uadmin -p -P3306 client_base < client_base.dump
WARNING: just copying folder with database name from
directory is not correct way of backing up.
'%plesk_dir%DatabasesMySQLdata'
Additional information
Backup and Restore Overview - MariaDB Knowledge Base
MySQL :: MySQL 8.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program
MySQL :: MySQL 8.0 Reference Manual :: 4.5.1 mysql — The MySQL Command-Line Client