2

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

Any script for doing so ?

1
  • 1
    You can make backup a MySQL database regularly to FTP server with the help of MySqlBackupFtp (mysqlbackupftp.com) Jul 15, 2016 at 9:59

1 Answer 1

4

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .