After having a vps crash, I asked my hosting to give me the dumped file of my drupal database. It is a folder filled with of *.frm *.MYD files of the database tables. I used to restore mydb.sql files thru command line (mysqldupm ...) but I have no idea how I can restore the current folder. Your help is much appreciated.
|
The best thing you could do would be to ask them to run mysqldump and give you a proper backup file, as this will be more robust to potential versioning issues in both mysql and the host OS. If they're not willing to do this, you can try copying the files they gave you directly to the data directory (e.g., /var/lib/mysql) with the server stopped, then starting the server and GRANTing privileges to appropriate users. |
|||||||||||||
|
|
First make one thing clear, if you want restore mysql database from 'sql' format, you should use "mysql database < backupfile.sql" command. Since you are having only backup folder, you have only option to replace the current database folder which resides in "/var/lib/mysql/" by backup folder. Also permissions of folder should set to mysql. I have given the model steps below. Situation : You have drupal database folder name "drupal" This folder is present inside "/var/lib/mysql/". So use the below commands Login your server $ cd /var/lib/mysql $ mv drupal drupal.bak Now restore the folder with the name drupal here and apply appropriate permissions by $ chown mysql.mysql drupal You can then access your database and let me know if the problem still lies.. Regards, S.Ragavendra Ganesh |
|||
|
|