#####################
#Script FTP to another host.
#####################
#!/bin/sh
HOST="122.122.122.122"
USER="insertlogin"
PASSWD="insertpassword"
FILE="mydatabase.sql"
LOCATION="/Library/Webserver/Websites/localsite/mydatabase.sql"
ftp -n $HOST <<EOF
quote USER $USER
quote PASS $PASSWD
binary
#ดึงไฟล์มา
get $FILE $LOCATION
#วางไฟล์
put $FILE $LOCATION
quit
EOF
exit 0