Drupal: How To Restore Database
If you have a backup copy of your database, you can easy use this copy to restore your site workability. In this article I would tell you a few solutions of how to do that.
Using MySQL program (via SSH)
MySQL program is included to the MySQL kit as well as mysqldump. Here are a few steps that will allow you to restore the database:
- Upload backup file (dump.sql) to the server;
- Unpack the uploaded file if it was packed;
- Connect to the server via SSH;
- Open to a folder with backup file;
- Run the following command:> mysql -uLOGIN -PPORT -hHOST -pPASS DBNAME < dump.sql
Using Staggered MySQL Dump Importer script
The script does step-by-step import of large and huge MySQL dumps (like phpMyAdmin 2.x Dumps) even through servers with runtime limit and servers which work in safe mode. The script runs a small part of a huge dump and restart itself. The next session begins at a point the previous session ends.
You can find more details about the script here: http://www.ozerov.de/bigdump.php
Summary
You can use MySQL to restore your database if you have SSH-access to the database server. If you have no SSH access, you should use script.
Good luck!