PDA

View Full Version : Dump DB to CSV



cmadsen
06-03-2007, 07:36 PM
I have a form that is inputing to a mySQL db. I need to dump that table to a csv file and then FTP that file to a XP folder on another computer. The problem I'm having is the transfer of the file to the XP computer.

Twey
06-03-2007, 07:49 PM
In what language?

cmadsen
06-03-2007, 11:39 PM
PHP. This job needs to be automatic thru a cron job.

Twey
06-04-2007, 11:10 AM
Hm, it's probably easiest to use a shell script for the FTP transfer:
ftp -in <<EOF
open ftp.backupsite.com
user youruser yourpassword
mput /some/directory/*
bye
EOF

cmadsen
06-04-2007, 03:14 PM
Thanks. I forgot all about shell scripting.