Support: 1-800-961-4454
Sales Chat

Rackspace Cloudvent Calendar Day 19: Backing Up Your Cloud Database

In the spirit of the holiday season, I’m sharing some tips and features of our cloud that you may not know about. In this countdown I’ll have 24 posts for you, each covering a single topic or feature about Rackspace Cloud products. We’ll post one per day so keep checking back!

On day 3 we discussed Polyglot Backup – how to avoid disaster by implementing a backup strategy that involved images and the Cloud Backup service. What about backing up data that exists in a service, like Cloud Databases? Today, we need to use the API to create a backup. Support for database backups in the control panel is coming soon! Let’s start by creating a backup of our database. You’ll need the UUID of your database instance and create a JSON file:

    "backup": {
        "description": "My Backup", 
        "instance": "f07ac506-1a99-4a2a-9a32-869b453019ef", 
        "name": "snapshot"

Next, pass this file in your request to the API:

curl –s –X POST –d backup.json –H “Content-type: application/json” –H “X-Auth-Token: $TOKEN”

If you need to restore a backup, you’ll need a different JSON file with the UUID of your backup:

    "instance": {
        "flavorRef": 1, 
        "name": "json_restore", 
        "restorePoint": {
            "backupRef": "8c40f9c2-6fe8-4b6b-a823-8a6b1d181f09"
        "volume": {
            "size": 2

Then you need to pass this file in your request:

curl –s –X POST –d restore.json –H “Content-type: application/json” –H “X-Auth-Token: $TOKEN”

Congrats! You can now backup your database and restore it if needed. Keep checking back this month for more tips!
Rackspace Cloudvent Calendar Day

About the Author

This is a post written and contributed by Hart Hoover.

Hart Hoover is a Cloud Strategist at Rackspace Hosting. Hoover started his career as a Racker in 2007 as a Linux Systems Administrator, providing technical support for dedicated servers. He moved to the cloud in 2009 to help design the Managed Cloud Servers support model. He has presented at various technical conferences, maintains and contributes to the Rackspace DevOps Blog, and advises Rackspace customers on best practices for cloud computing.

Racker Powered
©2016 Rackspace, US Inc.