hello mateys,
i've put up some basic shell commands (with the help of our beloved lord google the mighty) that will allow you to backup your DBs locally, gzipped it and then send it thru ftp to safe place you've picked

Code: 
#!/bin/bash
mysqldump -uYOURUSERNAME -pYOURPASS -hlocalhost YOURDBNAME > /your/path/backup-`date +%d%m%y`.sql
tar -zcvf /your/path/zippedbackup-`date +%d%m%y`.tgz /your/path/*.sql

cd /your/path
HOST='YOURFTPHOST'
USER='YOURFTPUSERNAME'
PASSWD='YOURFTPPASS'
ftp -n -v $HOST << EOT
binary
user $USER $PASSWD
prompt
put zippedbackup-*
bye
EOT

rm -rf /your/path/*

exit 0
that's it. you can run it automatically using cron or nohup.
also don't forget to chmod it first to 755 so that the script can be executed

hope that helps.
masterbator Reviewed by masterbator on . How to: remotely backup your DB (bash script) hello mateys, i've put up some basic shell commands (with the help of our beloved lord google the mighty) that will allow you to backup your DBs locally, gzipped it and then send it thru ftp to safe place you've picked #!/bin/bash mysqldump -uYOURUSERNAME -pYOURPASS -hlocalhost YOURDBNAME > /your/path/backup-`date +%d%m%y`.sql tar -zcvf /your/path/zippedbackup-`date +%d%m%y`.tgz /your/path/*.sql cd /your/path HOST='YOURFTPHOST' Rating: 5