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

I have been a customer long enough now to see that the uptime and the CPU performance of the VPS are excellent. I am real glad Rimuhosting is prospering, and you can count on me being a customer for a long time to come.

- Lloyd (in a thank you note to us) (#97/298)
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

Hosting

Why RimuHosting

RimuHosting