Rackspace Cloud Backup - Backing up Databases


Rackspace Cloud Backup

Using Rackspace Cloud Backup for your Database

You can use Rackspace Cloud Backup to backup your database by following a few steps.

First, some background

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.

Backing Up Your Database

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. Cloud Backup only saves the changed portions of the file.

  1. Remove the live database folder and files from your backup job.
    1. In your Cloud Account, click "Backup" in the navigation bar
    2. Select your System from the Systems List
    3. Click the Backups Actions icon (gear) next to your Backup job in the Backup List; Select Configure Files
    4. Navigate to your database folder and unselect it
    5. Click the Save Changes button.
  2. Dump your database.
    1. Using mysqldump, for instance, go to your database and enter
      	mysqldump -u root -p mytestdb > /my_directory/mytestdb.sql
      	
  3. Add the your sql dump file to your backup.
    1. In your Cloud Account, click "Backup" in the navigation bar
    2. Select your System from the Systems List
    3. Click the Backups Actions icon (gear) next to your Backup job in the Backup List; Select Configure Files
    4. Navigate to your database backup folder and select it
    5. Click the Save Changes button.

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.



Was this content helpful?




© 2014 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER