Linux – Network – Technology
Plesk – Migrate DB
On source server backup the database. You may use the following command:
source ~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` DATADASE_NAME > DATADASE_NAME.dump
On destination server create database DATADASE_NAME on domain DOMAIN.NAME with Plesk CLI /usr/local/psa/bin/database. Assign the same user and password:
destination ~# /usr/local/psa/bin/database --create DATADASE_NAME -domain DOMAIN.NAME -type mysql -passwd DB_USER_PASSWD -passwd_type plain -add_user DB_USER_NAME -server localhost
Database creation through Plesk CLI /usr/local/psa/bin/database will update Plesk database with appropriate user and password correctly. Run the utility wit “–help” to get list of all available options. After creation it is possible to login to the database through DB WebAdmin in Parallels Plesk Panel on destination server: Domains -> DOMAIN.NAME -> Databases -> DATADASE_NAME -> DB WebAdmin
On destination server restore content of the database from the dump created on source server:
destination ~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` DATADASE_NAME < DATADASE_NAME.dump
| Print article | This entry was posted by admin on October 26, 2011 at 19:22, and is filed under General. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |