The thing is that I don't have phisical access to the server and it doesn't have telnet access either. What I want to achieve is to make a password protected page inside my site were a button is kept to start a full backup of my MySQL DB and after clicking on it, be able to select the Internet Explorer's option to store the file xxxxxxx.sql in my HDD. Is this possible? I use the built'in function of phpbb that does exactly that and it's just beautifull.
Thanks again, ___________________________ Cesar L. Aracena Commercial Manager / Developer ICAAM Web Solutions 2K GROUP Neuquen, Argentina Tel: +54.299.4774532 Cel: +54.299.6356688 E-mail: [EMAIL PROTECTED]
"Ajai Khattri" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED]
On Sat, Dec 06, 2003 at 04:39:22PM -0300, Cesar Aracena wrote:
I am wondering if someone could point me to the right functions to use
to
make a script to dump all the tables in a specific MySQL DB. I need this
to
keep a daily backup from my site as the hackers are screwing up my site
very
often these days.
Much easier to use mysqldump in a shell script to do this.
man mysqldump
-- Aj. Sys. Admin / Developer
Use mysqldump in a system() call, redirect it to a temp file, then read it back and out to the browser.
Or, you could use popen to get the output piped back into php. Make sure to check the mysqldump options for things you need (I often use -Q -e --add-drop-table).
<?php header('Content-type: application/mysql'); header('Content-disposition: attachment; filename=dump.sql'); $fd = popen('mysqldump -uuser -ppassword databaseName', 'r'); while(!feof($fd)) { echo fgets($fd); } pclose($fd); ?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php