PDA

View Full Version : Restoring MySQL DB


adriandaz
06-15-2003, 06:32 PM
Hi, I did a cPanel backup of my database (for my forum) but it downloaded a backup in a wierd format files (.frm, .MYD and .MYI) I didn't get a .sql file to restore :( does anyone know if I can convert them into a .sql file, and I can't restore them with mysqlhotcopy because I don't have shell access, I do have limited access with cgitelnet :(

any ideas?

thanks,

Adrian.

Bison
06-20-2003, 03:51 PM
Why don't you go into the Admin CP and do a database dump to your server and download it to your home pc instead?

Create a folder outside your "www or htdocs" directory. ex: "db backups"

In your adminCP, go here: Import & Maintenance -->
Back-up Database

Fix the path to you folder:
(Where "/home/your folder/db backups/forumbackup-06-xx-2003.sql")

FTP to your account and download it.

Restore the db file:

1.) Telnet to your account.
2.) Type "mysql -u (your database username) -p (your database name)"
3.) When promted for password, type in your db password.
4.) At the prompt, type "connect (your db name)".
5.) Type "insert into (your db name) \. ../db backups/forumbackup-06-xx-2003.sql;

About those files you downloaded:
Those files are MySQL data files that can be found inside the folder where MySQL is installed on the server your site is hosted on. There's a control in cpanel which will allow you to make a backup copy on your server.

If this is possible, the only way I can see to make a backup is to contact your host and ask them to overwrite the data files where your database is stored with the files you have there.