Script to automate your mysql database backups

Discussion in 'Web Design and Hosting' started by Vishal P. Rao, Jul 22, 2005.

  1. Vishal P. Rao

    Vishal P. Rao Administrator Staff Member

    I was looking around for a script to automate my mysql databases and I found this excellent script at:

    What this script does is it automatically creates a daily, weekly and monthly backups of your mysql databases at a time interval specified by you. For those who have their site's data entirely on a database, like this forum, this script will prove to be boon. The best part is it even rotates daily/weekly backups, thereby deleting old backups and not unnecessarily waste your server space.

    Many web hosts claim to take daily backups of your sites but I have learnt from experience that it's always advisable to create additional backups on your own to ensure double safety.

    For this script to work, your web host should allow you to execute shell scripts and also allow "cron" jobs. Cron jobs is a feature of linux servers that allow you to execute scripts at a specified interval, either multiple times a day, daily, weekly or monthly. A shell/telnet access to your server is necessary, if you cannot specify cron jobs from your hosting control panel.

    The command to include in the cron job is:
    sh /location/of/the/script

    Rest all instructions is provided in the script itself.
  2. noboss

    noboss New Member

  3. cupbucket

    cupbucket New Member

    Way over my head!

Share This Page