Currently Viewing Posts Tagged offsite

Schedule Backup MySQL database and FTP offsite in Centos

I have a VPS powered by Centos 5.2.
There are some very important forum on it. I would like to backup it every day.
Now because HyperVM/LxAdmin – Backup Home, can not backup MySQL or not easy to get it. I have to write the shell script to do the backup job.
To use the FTP I need lftp tool.
The whole picture looks like below.
1) Dump all MySQL databases and compress them, save them in /home/usera/backup/mysql/
2) FTP them to Backup server of Dreamhost at /vps-backup/mysql/
3) Remove the backup files 4 days old.
You have to use your own account name and password.
usera is my sample user name. You can also use any other FTP server to save your offsite backups.
You make a file under /home/usera/mysql.backup.sh
Put the content below in it, save and make it executive.


Continue reading “Schedule Backup MySQL database and FTP offsite in Centos”

  • Archives