Re: Backup of a MySQL database.
| From: | Filip de Waard | Date: | Tue, 23 Mar 2004 00:28:21 +0000 |
| Subject: | Re: Backup of a MySQL database. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181196@lists.php.net to get a copy of this message | ||
On Mar 23, 2004, at 1:10 AM, Chris W. Parker wrote:
Elliot J. Balanza <mailto:webmaster@mbtradingco.com>I thought of that to, but I would prefer to write some PHP code to do this (like I suggested in my previous message). That is indeed a little more robust and works on windows to. I'm sure that there are pre-written functions on the net that do it using PHP code inside of mysqldump, so it's not necessary to chose this solution when you need a easy way out. Regards, Filip de Waardon Monday, March 22, 2004 3:05 PM said:I was looking something more like a MySQL dump class or function...this may not be as robust a solution as you require but can you not simply backtick the mysqldump command from within php? <?php $date = date(); $output = `mysqldump --opt --quote-names -u root --password=daword database > file_$date.dump`; ?> or even create a shell script that does all the dumping and handling of dump files and then just execute that.