You can use Rackspace Cloud Backup to backup your database by following a few steps.
Rackspace Cloud Backup backs up files, provided it can get access to them. Simply put, Rackspace Cloud Backup doesn’t care if the files contain database data or pictures of your cat. Files are files.
But some applications (like databases) are a little trickier, in that the consistent and correct state of the database is represented by multiple files at once. If Rackspace Cloud Backup backs up one of the databases’ files, and then a few seconds (or milliseconds) later it backs up another one, the state of the database could get corrupted – the database might have been in the middle of an operation during access to the two files, and the two files represent two different points in the middle of that operation.
Most databases have a utility that dumps a consistent state of the database to another file; mysqldump is one such utility for mysql. You can safely back up a database using Rackspace Cloud Backup by running such a utility before doing the backup –- then you back up the output of the utility, not the internal files that the database manages. Some customers use a utility like cron to regularly schedule the database dumping, and then schedule Rackspace Cloud Backup to automatically back up the output of this utility a couple of hours later.
Plus, our de-duplication and compression capabilities help you save space and storage costs, because there is probably a lot of duplicated data between the various dumps that were put into the sqlbackups folder. RCBU only saves the changed portions of the file.
mysqldump -u root -p mytestdb > /my_directory/mytestdb.sql
For more information on Exporting your database backups using mysqldump, see our article on Importing and Exporting MySQL Databases.
If you would like to automate your database dumps using cron, please see our Basic Linux Task Scheduling with cron article.
Remember to add your database dump file or folder saved as part of your Backup job.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License