Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
2.7k views
in Q2A Core by
Hi everyone, backing up all data by phpmyadmin every day is kind of time consuming.

I would like to have it automated:

1. script call by cronjob

2. dumps mysql data -> saves the entire database in a file (optional with gzip)

3. stores the file on server (ftp) with date, e.g. "2012-08-16-backup.zip"

Who can recommend a script for that?

4 Answers

+1 vote
by
selected by
 
Best answer

Here is a solution for using cronjob + shell script for automatic database backups on shared hosting:

"mysqldump to backup ALL databases on shared hosting"
http://codesel.blogspot.com/2012/08/mysqldump-to-backup-all-databases-on.html

+1 vote
by

AutoMySQLBackup

A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump. Features - Backup mutiple databases - Single backup file or to a seperate file for each DB - Compress backup files - Backup remote servers - E-mail logs – More

 

 

by
edited by
thanks Merkus for pointing this out. However, I have a shared hosting and am not sure if i can install this (install.sh).

So I am searching for a PHP script that I can call using a cronjob.

Edit: I just saw that I can use the cronjob to start "shell scripts". Maybe there does exist something?
by
You can use either a php or shell script. I recommend using mysqlldump, which you should have on a shared server.
by
yes, thanks, this is what I did now :)
0 votes
by

Here is another one that installs and runs from a browser and supports php or perl via cron.

MySQLDumper

 

 

 

by
thanks Merkus. I used the mysqldump instead :)
see answer.
0 votes
by
You could also use cPanel backup wizard, or a cron job from the linux command line.
...