Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
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
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"

+1 vote


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



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?
You can use either a php or shell script. I recommend using mysqlldump, which you should have on a shared server.
yes, thanks, this is what I did now :)
0 votes

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





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