Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A script that creates an archive of all the mysql databases on your server

branch: master

Removed an unused variable

Updated the cleanup code so it only logs the deleted of DB backups and not the logs as well
latest commit 07aaaa251d
Matt McManus mattmcmanus authored September 02, 2010
Octocat-spinner-32 Some more readme style tweaks August 19, 2010
Octocat-spinner-32 backup_dbs.php Removed an unused variable September 02, 2010
Octocat-spinner-32 backup_dbs_config.php Initial commit August 19, 2010


  • Download the repository
  • Update backup_db_config.php with your database information, desired backup location and How many days you would like to keep old backups (default: 7)
  • Either manually run the script or add it to your crontab php /path/to/script/db_backup.php


Originally created by Dagon Design (

Updated by Matt McManus (, - Aug 18th, 2010

  • Moved logs to it's own folder
  • Added support for log rotation. Set the CLEANUP_AFTER variable to how many days of backup you want to keep
  • Removed support for emailing backups. Why would anyone do this?
  • Added server hostnames to the log
  • Logs can now be emailed everytime to job is run
Something went wrong with that request. Please try again.