RimuHosting: Mighty Linux Servers.  Support Worth Raving About
Plans & Pricing
Server Recommendation Tool
Server Types
  VPS
  Semi-dedicated Server
  Dedicated Server
Server Locations
  Dallas
  London
  Australia
VPS Technology
Hardware
Data Centers
Linux Distributions
Applications
Maintenance Notices
Support Ticket
Control Panel
HOWTO Articles
Forums
VPS control panel
Billing details
Receipts
Contact details
DNS
Reverse DNS
Console-over-SSH
FTP backup space
Backup mail server
About
Staff
News
Customer Testimonials
Sales Inquiry
Link To Us
Terms and Conditions
Site Map

Order VPS Hosting
Order a VPS, Semi- dedicated or Dedicated server in Dallas, London or Australia.

Get Assistance
Ask our support team about your hosting requirements.


Host where the staff takes pride in making customers happy

If it was biologically possible I would have your babies.

- Matt (after Dominic here sorted out his sendmail/dovecot setup) (#65/269)
Home > Support > HOWTO List > MySQL > Backup

MySQL howtos

Automated MySQL Database Backup

Want to backup your MySQL databases to another machine on a nightly basis? 

Then create a /etc/cron.daily/mysqlbackup.sh job like this:

mysqldump --compress -u root -p$pw -h $currenthost --add-drop-table --extended-insert --quote-names --databases db1 db2| mysql -u root -p$pw -h $remotehost

Run chmod +x /etc/cron.daily/mysqlbackup.sh.  And change the $ parameters to the appropriate 'real' values.

Or if you are not backing up to a separate host, run:

mysqldump -u root -p$pw -h $currenthost --add-drop-table --extended-insert --quote-names --databases db1 db2 > /var/log/mysql.backup.$(date +"%Y%m%d").sql