backup sql with php

Soldato
Joined
24 Nov 2002
Posts
16,378
Location
38.744281°N 104.846806°W
Is there an easy way to do this?

I want, quite literally, to be able to backup an entire database to an .sql/.gz file with a click. It is for a frontend, so can't use phpmyadmin (unfortunately).

I haven't been able to get any googled methods to work. As a note, "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname" won't work apparently as I'm debugging on windows, not *nix (irony, I know!).

Also, I'd like to be able to import this file easily (mysql < poo.sql) through a similar frontend process (thus blank/delete db beforehand).

Any ideas?
 
http://www.karakas-online.de/forum/viewtopic.php?t=49

This should help you (i think).

We used to do it another way when I used something to save an entire PHP forum's mysql database to a .gz, and restoring it with BigDump, but I can't for the life of me remember what we used to do it (it was via a script, rather than the buggy PHPBB database dump).

Will try and remember how we did it if the link above doesn't work.
 
Last edited:
Didn't work :(

Like I said I think it is a windows thing.... The final build will be hosted on OSX, but I'd like a work around for now.
 
Back
Top Bottom