Re: Re: MySQL back up
| From: | Owen Prime | Date: | Thu, 10 Oct 2002 03:52:43 +0000 |
| Subject: | Re: Re: MySQL back up | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119495@lists.php.net to get a copy of this message | ||
Haven't really been following this thread but you may want to make sure that
1. mysqldump & gzip are executable by apache
2. $backupdir is writeable by apache
3. You have taken into consideration your php safe mode settings
Cheers,
Owen Prime
http://www.noggin.com.au
Ken wrote:
> Okay here is the new code and this is still not working.
>
> <?php
>
> require("./config.php");
>
> $sqlserver = $server1;
> $sqlusername = $username1;
> $sqlpassword = $password1;
> $sqldatabase = $database1;
>
> //******************************
> $nam_bak=date('D,d-m-Y');
>
> exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\"
> \"$sqldatabase\" >
> $backupdir/$nam.sql");
>
> exec("gzip $backupdir/$nam.sql");
>
> ?>