Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Any script for doing so ?

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.