RE: [PHP] Re: MySQL back up
| From: | John W. Holmes | Date: | Thu, 10 Oct 2002 12:29:57 +0000 |
| Subject: | RE: [PHP] Re: MySQL back up | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119518@lists.php.net to get a copy of this message | ||
> 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');
Can you have a filename with a comma in it?
> exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\"
> \"$sqldatabase\"
>
> $backupdir/$nam.sql");
Take out the \" quotes around username, password, and database.
>
> exec("gzip $backupdir/$nam.sql");
---John Holmes...