That's exactly what I was looking for and the way I hoped it could be
done, only I hadn't seen anything about this 'exec' function.

Thanks. I should be able to figure it out myself but I will get back
with you if I need further help.

-- 
Loren McDonald <AKA MisterrMac>
Gods Of Music Reviewer/Editor
[EMAIL PROTECTED]
http://www.GodsOfMusic.com


-----Original Message-----
From: KH Chiu [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 17, 2003 9:19 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Database Backup Question

Sorry I am in a bit hurry and just post some hints on your question. It
is 
more than one way to do your job. One of the trival way is to use php 
function 'exec'. This function can execute shell programs. It means that
you 
can execute mysqldump etc. and create dump file.

>From my experience, you should exp. with exec for a while to get thru.
all 
the tricks like trustee and getting output back.

You should also zip or bzip the file using similar technique.

File download is trival.

If you need further help, you may let you know.

Regards,

> This is actually more a PHP question but since it refers to a MySQL
> database I thought I would ask here.
> I may not be looking in the right places but, I can't seem to find a 
> way to do a database backup through PHP (other than BACKUP TABLE,
>  which I don't want to use if possible)
> 
> What I mean is this:  I want to create a page that will allow me to
> click one button to initiate a backup process.  That action will then
> start a dump of a specified database to a text file that could then 
> be shown on a succeeding (success) page as a link for download (If
there's
> a way to zip prior to downloading, which would be even better).  I
> intend on using this as a manual backup process, so I want it to work
> like the mysqldump.exe or mysqlhotcopy.exe.  (All the tables are 
> MyISAM)
> 
> The only way I see this working would be to write in PHP a long 
> script that will manually create that dump file itself by using 
> SELECT and so forth.  This seems a bit redundant and extravagant a 
> way to go. 
> 
> Any help would be appreciated.
> 
> -- 
> Loren McDonald
> [EMAIL PROTECTED]
 





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to