Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how to backup a mysql database regularly to a ftp server i mention ?

Any script for doing so ?

share|improve this question
You can make backup a MySQL database regularly to FTP server with the help of MySqlBackupFtp ( – Nick Taylor Jul 15 at 9:59
up vote 4 down vote accepted

You could mount the remote ftp server using curlftpfs under /mnt/ftpserver/ for example and then backup your database using

mysqldump --all-databases --opt > /mnt/ftpserver/mysql_backup.sql

Alternatively you can perform the mysqldump and then use lftp to push the backup file to the ftp server using something like

lftp -c "open -u <username>,<password> <servername>/<directory>; set ftp:rest-stor false; put mysql_backup.sql"

If you need more detail, please add a comment.

share|improve this answer
I would suggest mounting with curlftpfs, as it would make overall maintenance easier - especially if you want to push other files in the future. – Nathan Adams Apr 12 '10 at 0:10
simply we can do it, Mysql dumpl get .sql file & upload to ftp – Athul Apr 12 '10 at 18:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.