MYSQL and File Backup?

4 replies
Is there any software that can backup all my mysql databases and files once a week?

I know how to do it manually through cPanel, but I have several sites and it could take a while.

Any suggestions would be appreciated.
#backup #file #mysql
  • Profile picture of the author rts2271
    <?php
    $dbuser=DB_USER;
    $dbpass=DB_PASSWORD;
    $dbname=DB_NAME;
    $dbhost=DB_HOST;
    $abpath=dirname(__FILE__);
    $today = date("Ymd");
    echo "Backing up Database to filename dbbackup_$today.sql<br />";
    $sql="mysqldump --host=localhost --user=".$dbuser." --password=".$dbpass." ".$dbname." > dbbackup_".$today.".sql";
    $command=$sql;
    system($command);
    ?>

    Merry Xmas, wrote this up for a automated WP backup. Call it dbbackup.php and add it as a cron. Place it below public_html so its not web accessible. Set the cron time to the value you want it running (Daily weekly etc etc)

    cron command should look something like this.
    php -f /home/CPANEL_USERNAME/dbbackup.php

    Backups will be placed in same folder. You can also make its own folder under public_html to keep it all neat and tidy.
    {{ DiscussionBoard.errors[6676761].message }}
  • Profile picture of the author Myles Sinclair
    Originally Posted by Mike Hlatky View Post

    Is there any software that can backup all my mysql databases and files once a week?...."
    If it's for Wordpress sites, you could try this plugin - WordPress › BackUpWordPress « WordPress Plugins

    I've just had to switch to this as my previous plugin wp-db-backup started to have a problem when I installed a cache plugin. Anyway the backupwordpress plugin goes one further than wp-db-backup in that it can also backup your files as well as the MySQL database.
    {{ DiscussionBoard.errors[6676892].message }}
  • Profile picture of the author Wide
    For wordpress: Try the Backup plugin, it will do an automated cPanel backup based on your defined backup schedule (automatically). Your entire cPanel account will be backed up, including all your databases and files.

    WordPress › Backuper: WordPress Backup Plugin « WordPress Plugins
    Signature
    {{ DiscussionBoard.errors[6701900].message }}
  • Profile picture of the author geek12
    Handy Backup can do your mysql backup very well and automatically.
    Handy Backup Software 7 | Back up Windows PC and Servers
    {{ DiscussionBoard.errors[6727261].message }}

Trending Topics