The MU forums have moved to WordPress.org

Mysql backup cron job (6 posts)

  1. kishorebudha
    Member
    Posted 15 years ago #

    Hi,

    Would anybody share their mysql backup cron job script (minus their db details). there are some available on the net, but just can't trust them.

    Cheers

  2. drmike
    Member
    Posted 15 years ago #

    Gotta admit that I just use CPanel's database backup every so often. I run optimize first to get it as small as possible. 190 megs currently.

  3. dizzy99
    Member
    Posted 15 years ago #

    Haven't tried this but i'm told its reliable and safe

    http://sourceforge.net/projects/automysqlbackup/

  4. kishorebudha
    Member
    Posted 15 years ago #

    I wanted to automate it. I have set up Cpanel to use automysqlbackup. Will report back tomorrow.

  5. dizzy99
    Member
    Posted 15 years ago #

    Let me know how you get on with it. Its supposed to be very good.

  6. woodsm
    Member
    Posted 15 years ago #

    mysqldump -u <USERNAME> -p<PASSWORD> -h <HOSTNAME> <DATABASENAME> > <FILENAME>.sql

    Replace the brackets and the content inside the brackets with your info.

    You can omit the "-h <HOSTNAME>" if you use localhost

    For more options and details: man mysqldump

    Then just set up your cron job to run.

About this Topic

  • Started 15 years ago by kishorebudha
  • Latest reply from woodsm