How To: Move Big Database

At some point, you want to move your website from the old server to the better server. Or you plan to move your website from shared server to a VPS or Dedicated server. If you move a website that has a large database, you may be having difficulty at the time of the process of entering a database to a new server.

To move the database files are quite large, you can follow the following steps:

First, log on to your old server via SSH and make a backup of your database using following command.

/usr/bin/mysqldump yourdatabasename -u yoursqluser -pyoursqlpassword > /home/yourusername(domain name)/databaswfile.sql

When you have finished making backups your database, now logged on to a new server using SSH. Download/Upload your backups database to the new server. Restore backup database using following command.

mysql yourdatabasename -u yoursqlusername -pyoursqlpassword < /home/yourname(domain name)/databasefile.sql

This should take a while, depending on your database size.

Leave a Reply