Reputation: 1445
so I'm not a server expert. Managed to migrate a server using Plesk's migration tool. All Plesk managed DBs were moved. But discovered that all DBs and users managed through MySQL were not migrated. Can anyone tell me a solution to this?
Upvotes: 1
Views: 354
Reputation: 3300
This is an expected behavior - Plesk Migration Tool will migrate only objects it knows about. Since you have some databases and users which are managed through MySQL directly, Plesk does not know anything about it, so they will not be transferred.
You should transfer such databases and users manually with mysqldump
.
To create a backup of database with mysqldump
you can use the following command:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin DATABASE_NAME > FILE_NAME.sql
To restore such database run:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin DATABASE_NAME < FILE_NAME.sql
Also you will need the mysql
database which contains grant information. I do not recommend you to blindly transfer it and just re-create users.
Keep in mind that if MySQL version on target server is higher than on source you will need to run mysql_upgrade
script to make changes in schema.
Alternatively you can export/import databases through phpMyAdmin
which is shipped with Plesk and can be found at Plesk > Tools & Settings > Database Servers.
Upvotes: 3