Applicable to:
- Plesk for Windows
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%"MySQL\bin\mysqldump -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%"MySQL\bin\mysql -uadmin -p -P3306 client_base < client_base.dump
WARNING: just copying folder with database name from
'%plesk_dir%Databases\MySQL\data\'
directory is not correct way of backing up.
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
Comments
0 comments
Please sign in to leave a comment.