[thelist] MySQL Backup Statement

Dan McCullough dan.mccullough at gmail.com
Fri Aug 5 09:01:51 CDT 2005


you could so a simple shell script and cron it.


#!/bin/sh
#backup.sh

date=`date -I`
rm -f /var/backup/dbname-bak-*.sql.gz
/opt/mysql/bin/mysqldump --opt --quote-names -u <user> -p<pass> dbname
| gzip > /var/backup/dbname-bak-$date.sql.gz



On 8/5/05, A Maynes <andrew at milords.com> wrote:
> I need to run a simple MySQL Backup statement without causing too much
> strain on the server what would be the best method?
> 
> I am thinking about running a cron to run a PHP script which simply
> dumbs the backup file in a DIR on a daily basis?
> 
> Anyone have a pointer to the PHP code please
> 
> Andrew
> 
> --
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


More information about the thelist mailing list