• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

MySQL Auto Backup

August 4, 2011 by Webhead

The following commands should be run daily.  This will give you a backup for 1 full month.  After 1 month the backups will overwrite the oldest files.  The %d is the day of the month.

GoDaddy:

In your Hosting Dashboard -> Content -> Chron Manager, enter the following line as the command.  Replace <xxx> with the appropriate values.

mysqldump --opt -Q -h <server_address> --user=<username> --password=<password> <database_name> > <your_path>/<database_name>_`date +%d`.sql

BlueHost:

In the CPanel -> Cron Jobs, enter the following line as the command.  replace <xxx> with the appropriate values.

mysqldump --opt -Q -h localhost --user=<username> --password=<password> <database_name> > /<your_path>/<database_name>_`date +%d`.sql

Filed Under: Server Stuff Tagged With: bluehost, goDaddy, mysql

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization macOS mac os x ms sql mysql open source optimize php php 7.2 rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized