[BNM] MySQL auto data export

Pete Dowdell contact at stridebird.com
Mon Apr 3 10:42:01 BST 2006


Jason Bailey wrote:

>This has probably already been answered but I'm reading via google groups. 
>Is mysqldump any good for you?
><http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html>
>It's in previous versions too. I run a cronjob which does a lynx view of a 
>php page.  This has some code that writes my data somewhere. It's not the 
>best way perhaps as you need WWW user rights which is a bit insecure.
>  
>

Yes, mysqldump is probably the best way to take a back up.  It should be 
installed as part of a normal MySql installation.

Create a batch file with the mysqldump parameters required
ie: mysqldump -u user -p pass -h hostname databasename > dumpname (see 
documentation!)

Run as a scheduled task.

Should be straightforward.  The obvious disadvantage of this approach is 
that you will have to put a plaintext password in the batch file for 
unattended operation, so it's probably best to create a backup user on 
the database with read-only permission.

Pete


More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service