Click to See Complete Forum and Search --> : get database backup manually


asmith20002
10-25-2008, 10:03 AM
hi

when I want to backup my databse, I go to cpanel and click on backup, it generates a .sql file (inside a zip file) , when I run that .sql file though phpmyadmin or mysql query browser, it updates my database (remove all tables and creates his own and insert rows again)

How can I do that manually? is there any function in mysql I could use so that it creates this file for me ?

P.S need to do a lot of things with this file, need to create it with an script.

chazzy
10-25-2008, 11:50 AM
you can do a mysqldump to generate the same data.

other than that, all it is doing is looking at your metadata tables, you could look at the INFORMATION_SCHEMA database and build a script using perl/php, etc.

gvphubli
11-12-2008, 04:31 PM
you try the script discussed here..

http://gvphubli.blogspot.com/2008/05/backing-up-mysql-database.html