On demand backups#

This section describes the following API operations for backups of database instances.

Note

Any user calling the backup operations for Cloud DB will need access to Cloud Files.

The following table lists the possible statuses returned by the Backup API:

Backup statuses

Status

Description

NEW

A new backup task was created.

BUILDING

The backup task is currently running.

COMPLETED

The backup task was successfully completed.

FAILED

The backup task failed to complete successfully.

DELETE_FAILED

The backup task failed to delete Cloud Files objects.

The Backup API supports the following operations:

Create backup#

POST /{version}/{accountId}/backups

Creates a new backup for a database instance.

This operation asynchronously creates a new backup for the specified database instance. This call requires the user to specify an instance ID to backup and a name for the backup.

The following table lists the required and optional attributes for Create Backup:

Required and optional attributes for Create backup#

Name

Description

Required

name

Specifies the short name of the backup.

Yes

instance

Specifies the database instanceId to backup.

Yes

description

Specifies a long description of the backup.

No

parent_id

Specifies the backupId from which to create an incremental backup.

No

copy_to

Copies the completed backup to remote regions.

No

Length restrictions for backup name parameter#

Restriction

Value

name maximum length

64

Note

  • During the backup process, database writes on MyISAM Databases are disabled. InnoDB Databases continue to allow all operations.

  • While the instance is being backed up, you cannot add or delete databases or users, and you cannot delete, stop, or reboot the instance.

  • Users can only run one backup at a time. Duplicate requests return a 422 error.

  • Backups are not deleted when the instance is deleted. You must manually remove any backups created using the Backups API. For details, see the Delete backup operation.

  • During backup, the files are streamed to your Cloud Files account. The process creates a container called z_CLOUDDB_BACKUPS and places all the files in it. In order for the restore and deletion of backups to work properly, do not move, rename, or delete any of the files from this container. You will be charged the normal Cloud Files rate for storage of these files. For pricing details, see Rackspace Cloud Calculator. No additional Cloud Databases fee applies for creating backups. You can delete old backups through the API. See the Delete backup operation.

  • In the unlikely event that the backup fails to perform correctly and is in a FAILED state, some files might have been placed in the container. In these cases, use the API to delete the backup to remove any leftover files. For details, see the Delete backup operation.

  • When a backup is deleted, all incremental backups created from it are also be deleted.

  • You can create an incremental backup from another incremental backup. There is no limit to the number of nested backups you can create. However, the more nested backups you create, the higher the chances of a restore failure.

  • The copy_to attribute can be DFW, IAD, ORD, HKG, SYD. The region of LON is not supported.

  • In the case of copying an incremental backup, a 400 Bad Request will return if the backup’s parent is not found in the destination region.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

Example Create backup: JSON request

The following example shows the Create backup request:

POST /v1.0/1234/backups HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

{
    "backup": {
        "description": "My Backup",
        "instance": "d4603f69-ec7e-4e9b-803f-600b9205576f",
        "name": "snapshot"
    }
}

Example Create incremental backup request: JSON

The following example shows the Create incremental backup request:

POST /v1.0/1234/backups HTTP/1.1

User-Agent: python-troveclient

Host: troveapi.org

X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7

Accept: application/json

Content-Type: application/json
{

    "backup": {

        "description": "My Incremental Backup",

        "instance": "44b277eb-39be-4921-be31-3d61b43651d7",

        "name": "Incremental Snapshot",

        "parent_id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4"

    }

}

Example Create backup with copying: JSON request

The following example shows the Create backup request with copy_to:

POST /v1.0/1234/backups HTTP/1.1
Host: dfw.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

{
    "backup": {
        "description": "My Backup",
        "instance": "d4603f69-ec7e-4e9b-803f-600b9205576f",
        "name": "snapshot",
        "copy_to": ["IAD", "ORD"]
    }
}

Response#

Example Create backup: JSON response

The following example shows the Create backup response:

HTTP/1.1 202 Accepted
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 300
Date: Thu, 13 Feb 2014 21:47:16 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)

{
    "backup": {
        "created": "2014-02-13T21:47:16",
        "description": "My Backup",
        "id": "61f12fef-edb1-4561-8122-e7c00ef26a82",
        "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
        "locationRef": null,
        "name": "snapshot",
        "parent_id": null,
        "size": null,
        "status": "NEW",
        "updated": "2014-02-13T21:47:16"
    }
}

Example Create incremental backup response: JSON

The following example shows the Create incremental backup response:

HTTP/1.1 202 Accepted

Content-Type: application/json

Content-Length: 462

Date: Mon, 18 Mar 2013 19:09:17 GMT
{
    "backup": {
        "created": "2014-10-30T12:30:00",
        "datastore": {
            "type": "mysql",
            "version": "5.5",
            "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
        },
        "description": "My Incremental Backup",
        "id": "2e351a71-dd28-4bcb-a7d6-d36a5b487173",
        "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
        "locationRef": null,
        "name": "Incremental Snapshot",
        "parent_id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
        "size": null,
        "status": "NEW",
        "updated": "2014-10-30T12:30:00"
    }
}

Create backup for an HA instance#

POST /{version}/{accountId}/backups

Creates a new backup for the specified HA instance.

This operation asynchronously creates a new backup for the specified HA instance. This call requires the user to specify an HA ID to backup and a name for the backup.

The following table lists the required and optional attributes for Create Backup for an HA Instance:

Required and optional attributes for Create backup#

Name

Description

Required

name

Specifies the short name of the backup.

Yes

instance

Specifies the database instanceId to backup. But since we would need to create a backup of the entire HA group, the value of this field should be empty.

Yes

description

Specifies a long description of the backup.

No

parent_id

Specifies the backupId from which to create an incremental backup.

No

source

Specifies the source type (instance/ha) and source id (instanceID/haID).

Yes (to create HA group backups)

Length restrictions for backup name parameter#

Restriction

Value

name maximum length

64

Note

  • To show details of a HA backup, see the List backups operation.

  • To list backups for a specified HA instance, see the List backups of an HA instance operation.

  • While creating a backup of a HA Instance, the backup of the latest replica instance (the one closest to the source) is taken.

  • The HA instance goes into a BACKUP state if it has a running backup.

  • Backups are not deleted when the instance is deleted. You must manually remove any backups created using the Backups API. See the Delete backup operation for details.

  • During the back up process, files are streamed to your Cloud Files account. The process creates a container called z_CLOUDDB_BACKUPS and places all the files in it. In order for the restore and deletion of backups to work properly, do not move, rename, or delete any of the files from this container. You will be charged the normal Cloud Files rate for storage of these files. For pricing details, see Rackspace Cloud Caculator. No additional Cloud Databases fee applies for creating backups. You can delete old backups through the API. For details see Delete backup.

  • In the unlikely event that the backup fails to perform correctly and is in a FAILED state, some files might have been placed in the container. In this case, use the API to delete the backup, removing any leftover files. See the Delete backup operation for details.

  • When a backup is deleted, all incremental backups created from it are also deleted.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

Example Create backup for an HA Instance: JSON request

The following example shows the Create backup of an HA instance request:

POST /v1.0/1234/backups HTTP/1.1
User-Agent: python-troveclient
Host: dfw.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json
{
   "backup":{
      "instance":null,
      "description":"my_ha_backup1",
      "name":"ha-backup1",
      "source":{
         "type":"ha",
         "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
      }
   }
}

Example Create incremental backup request: JSON

The following example shows the Create incremental backup request:

POST /v1.0/1234/backups HTTP/1.1
User-Agent: python-troveclient
Host: dfw.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json
{
   "backup":{
      "instance":null,
      "description":"my_ha_backup2",
      "name":"ha-backup2",
      "parent_id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
      "source":{
         "type":"ha",
         "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
      }
   }
}

Response#

Example Create backup for an HA Instance: JSON response

The following example shows the Create backup response:

HTTP/1.1 202 Accepted
Content-Type: application/json
Via: 1.1 Repose (Repose/2.12)
Content-Length: 535
Date: Mon, 31 Aug 2015 22:16:25 GMT
Connection: close
Server: Jetty(8.0.y.z-SNAPSHOT)
{
   "backup":{
      "status":"NEW",
      "updated":"2015-08-31T22:16:25Z",
      "description":"my_ha_backup1",
      "datastore":{
         "version":"5.6",
         "type":"mysql",
         "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
      },
      "id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
      "size":null,
      "is_automated":false,
      "name":"ha-backup1",
      "parent_id":null,
      "created":"2015-08-31T22:16:25Z",
      "flavor_ram":1024,
      "instance_id":null,
      "source":{
         "type":"ha",
         "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
      },
      "locationRef":null,
      "type":"InnoBackupEx",
      "volume_size":1
   }
}

Example Create incremental backup response: JSON

The following example shows the Create incremental backup response:

{
   "backup":{
      "status":"NEW",
      "updated":"2015-08-31T22:26:23Z",
      "description":"my_ha_backup2",
      "datastore":{  },
      "id":"e1cb03fd-c108-4702-a04b-653491e41a91",
      "size":null,
      "is_automated":false,
      "name":"ha-backup2",
      "parent_id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
      "created":"2015-08-31T22:26:23Z",
      "flavor_ram":1024,
      "instance_id":null,
      "source":{
         "type":"ha",
         "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
      },
      "locationRef":null,
      "type":"InnoBackupExIncremental",
      "volume_size":1
   }
}

List backups#

GET /{version}/{accountId}/backups

Lists all backups for all database instances.

This operation returns a list of all backups for all database instances.

You can filter by datastore type using the datastore query parameter.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

This table shows the query parameters for the request:

Name

Type

Description

datastore

String (Optional)

The type of the datastore by which to filter.

This operation does not accept a request body.

Example List backups: JSON request

The following example shows the List backups request:

GET /v1.0/1234/backups HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

Example List backups query request: JSON

The following example shows the List backups query request:

GET /v1.0/1234/backups?datastore=mysql HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

Response#

Example List backups: JSON response

The following example shows the List backups response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.12)
Content-Length: 2759
Date: Tue, 01 Sep 2015 03:23:52 GMT
Connection: close
Server: Jetty(8.0.y.z-SNAPSHOT)

{
   "backups":[
      {
         "status":"COMPLETED",
         "updated":"2015-09-01T03:23:36Z",
         "description":"My standalone instance backup1",
         "datastore":{
            "version":"5.6",
            "type":"percona",
            "version_id":"c9760c5b-5675-4482-b097-dffdf50c22ab"
         },
         "id":"d9f56b04-e17d-41f0-ae92-30a3b47b8d29",
         "size":0.18,
         "is_automated":0,
         "name":"test_instance-backup",
         "parent_id":null,
         "created":"2015-09-01T03:23:28Z",
         "flavor_ram":1024,
         "instance_id":"f4aaba46-fb5f-4316-988d-88da77759968",
         "source":{
            "type":"instance",
            "id":"f4aaba46-fb5f-4316-988d-88da77759968"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/d9f56b04-e17d-41f0-ae92-30a3b47b8d29.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:26:29Z",
         "description":"my_ha_backup2",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"e1cb03fd-c108-4702-a04b-653491e41a91",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup2",
         "parent_id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
         "created":"2015-08-31T22:26:23Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/e1cb03fd-c108-4702-a04b-653491e41a91.xbstream.gz",
         "type":"InnoBackupExIncremental",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:22:52Z",
         "description":"my_ha_backup2",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"c6bbca39-e530-41f3-b073-03144dea04e3",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup2",
         "parent_id":null,
         "created":"2015-08-31T22:22:46Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/c6bbca39-e530-41f3-b073-03144dea04e3.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:16:30Z",
         "description":"my_ha_backup1",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup1",
         "parent_id":null,
         "created":"2015-08-31T22:16:25Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      }
   ]
}

Example List backups query response: JSON

The following example shows the List backups query response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.12)
Content-Length: 2032
Date: Tue, 01 Sep 2015 03:26:46 GMT
Connection: close
Server: Jetty(8.0.y.z-SNAPSHOT)
{
   "backups":[
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:26:29Z",
         "description":"my_ha_backup2",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"e1cb03fd-c108-4702-a04b-653491e41a91",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup2",
         "parent_id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
         "created":"2015-08-31T22:26:23Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{  },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/e1cb03fd-c108-4702-a04b-653491e41a91.xbstream.gz",
         "type":"InnoBackupExIncremental",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:22:52Z",
         "description":"my_ha_backup2",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"c6bbca39-e530-41f3-b073-03144dea04e3",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup2",
         "parent_id":null,
         "created":"2015-08-31T22:22:46Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/c6bbca39-e530-41f3-b073-03144dea04e3.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:16:30Z",
         "description":"my_ha_backup1",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup1",
         "parent_id":null,
         "created":"2015-08-31T22:16:25Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      }
   ]
}

List backup by ID#

GET /{version}/{accountId}/backups/{backupId}

Lists details about a specified backup.

This operation lists the details for a specified backup.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

{backupId}

String

The backup ID for the specified backup.

This operation does not accept a request body.

Example List backup by ID: JSON request

The following example shows the List backup by ID request:

GET /v1.0/1234/backups/61f12fef-edb1-4561-8122-e7c00ef26a82 HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

Response#

Example List backup by ID: JSON response

The following example shows the List backup by ID response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.12)
Content-Length: 737
Date: Tue, 01 Sep 2015 03:34:53 GMT
Connection: close
Server: Jetty(8.0.y.z-SNAPSHOT)
{
   "backup":{
      "status":"COMPLETED",
      "updated":"2015-09-01T03:23:36Z",
      "description":"My standalone instance backup1",
      "datastore":{
         "version":"5.6",
         "type":"percona",
         "version_id":"c9760c5b-5675-4482-b097-dffdf50c22ab"
      },
      "id":"61f12fef-edb1-4561-8122-e7c00ef26a82",
      "size":0.18,
      "is_automated":0,
      "name":"test_instance-backup",
      "parent_id":null,
      "created":"2015-09-01T03:23:28Z",
      "flavor_ram":1024,
      "instance_id":"f4aaba46-fb5f-4316-988d-88da77759968",
      "source":{
         "type":"instance",
         "id":"f4aaba46-fb5f-4316-988d-88da77759968"
      },
      "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/d9f56b04-e17d-41f0-ae92-30a3b47b8d29.xbstream.gz",
      "type":"InnoBackupEx",
      "volume_size":1
   }
}

Example List backup by ID: JSON response

The following example shows the Show details of an HA instance backup by ID response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.12)
Content-Length: 713
Date: Tue, 01 Sep 2015 03:39:25 GMT
Connection: close
Server: Jetty(8.0.y.z-SNAPSHOT)
{
   "backup":{
      "status":"COMPLETED",
      "updated":"2015-08-31T22:26:29Z",
      "description":"my_ha_backup2",
      "datastore":{
         "version":"5.6",
         "type":"mysql",
         "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
      },
      "id":"e1cb03fd-c108-4702-a04b-653491e41a91",
      "size":0.18,
      "is_automated":0,
      "name":"ha-backup2",
      "parent_id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
      "created":"2015-08-31T22:26:23Z",
      "flavor_ram":1024,
      "instance_id":null,
      "source":{
         "type":"ha",
         "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
      },
      "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/e1cb03fd-c108-4702-a04b-653491e41a91.xbstream.gz",
      "type":"InnoBackupExIncremental",
      "volume_size":1
   }
}

Delete backup#

DELETE /{version}/{accountId}/backups/{backupId}

Deletes the specified backup.

This operation deletes the specified backup. When a backup is deleted, all incremental backups created from it will also be deleted.

This table shows the possible response codes for this operation:

Response Code

Name

Description

202

Accepted

The request has been accepted for processing.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

{backupId}

String

The backup ID for the specified backup.

This operation does not accept a request body.

Example Delete backup: JSON request

The following example shows the Delete backup request:

DELETE /v1.0/1234/backups/61f12fef-edb1-4561-8122-e7c00ef26a82 HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

Response#

Example Delete backup: JSON response

The following example shows the Delete backup response:

HTTP/1.1 202 Accepted
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 0
Date: Thu, 13 Feb 2014 21:47:17 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)

List backups for instance#

GET /{version}/{accountId}/instances/{instanceId}/backups

Lists all backups for a specified instance.

This operation lists all backups for a specified instance.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

{instanceId}

String

The instance ID for the specified database instance.

This operation does not accept a request body.

Example List backups for instance: JSON request

The following example shows the List backups for instance request:

GET /v1.0/1234/instances/d4603f69-ec7e-4e9b-803f-600b9205576f/backups HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

Response#

Example List backups for instance: JSON response

The following example shows the List backups for instance response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 338
Date: Thu, 13 Feb 2014 21:47:16 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)

{
    "backup": {
        "status": "COMPLETED",
        "updated": "2014-06-19T15:56:58",
        "description": "Backup from Restored Instance",
        "datastore": {
            "version": "5.1",
            "type": "MySQL",
            "version_id": "20000000-0000-0000-0000-000000000002"
        },
        "id": "e2d3dfca-430f-4cd2-bec0-884cd7426f13",
        "size": 0.141026,
        "name": "restored_backup",
        "created": "2014-06-19T15:55:54",
        "instance_id": "34d6c8bf-539e-47d1-8a06-2b7590521309",
        "parent_id": null,
        "locationRef": "http://localhost/path/to/backup"
    }
}

Restore backup#

POST /{version}/{accountId}/instances

Creates a new database instance from a backup.

This operation restores a backup onto a new database instance.

The following table lists the required and optional attributes for RestorePoint:

Required and optional attributes for RestorePoint#

Name

Description

Required

backupRef

Specifies the id of the backup to restore.

Yes

Note

  • Refer to Create instance for details on other options available during the creation of a new instance.

  • All users/passwords/access that were on the instance at the time of the backup will be restored along with the databases. You can create new users or databases if you want, but they cannot be the same as the ones from the instance that was backed up.

  • You can restore from an incremental backup the same as from a full backup. The system automatically restores all parents first, and then applies the incremental backup.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

Example Restore backup: JSON request

The following example shows the Restore backup request:

POST /v1.0/1234/instances HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

{
    "instance": {
        "flavorRef": 1,
        "name": "json_restore",
        "restorePoint": {
            "backupRef": "61f12fef-edb1-4561-8122-e7c00ef26a82"
        },
        "volume": {
            "size": 2
        }
    }
}

Response#

Example Restore backup: JSON response

The following example shows the Restore backup response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 697
Date: Thu, 13 Feb 2014 21:47:17 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)

{
    "instance": {
        "created": "2014-02-13T21:47:16",
        "datastore": {
            "type": "mysql",
            "version": "5.6"
        },
        "flavor": {
            "id": "1",
            "links": [
                {
                    "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "https://ord.databases.api.rackspacecloud.com/flavors/1",
                    "rel": "bookmark"
                }
            ]
        },
        "hostname": "e09ad9a3f73309469cf1f43d11e79549caf9acf2.rackspaceclouddb.com",
        "id": "1e9c84df-4443-4f39-9498-5ab7c14a3bb4",
        "links": [
            {
                "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/1e9c84df-4443-4f39-9498-5ab7c14a3bb4",
                "rel": "self"
            },
            {
                "href": "https://ord.databases.api.rackspacecloud.com/instances/1e9c84df-4443-4f39-9498-5ab7c14a3bb4",
                "rel": "bookmark"
            }
        ],
        "name": "json_restore",
        "status": "BUILD",
        "updated": "2014-02-13T21:47:16",
        "volume": {
            "size": 2
        }
    }
}

List backups of an HA instance#

GET /{version}/{accountId}/ha/{haId}/backups

Lists backups for the HA instance specified by ha_id.

This operation lists the backups of the HA instance specified by ha_id.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

{haId}

String

The ID for the specified HA instance.

This operation does not accept a request body.

Example List backups of an HA instance: JSON request

The following example shows the List backups of an HA instance request:

GET /v1.0/1234/ha/130922a2-b9ab-4e95-86be-9c5d79171b5e/backups HTTP/1.1
User-Agent: python-troveclient
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json

Response#

Example List backups of an HA instance: JSON response

The following example shows the List backups of an HA instance response:

HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.12)
Content-Length: 2032
Date: Tue, 01 Sep 2015 03:47:08 GMT
Connection: close
Server: Jetty(8.0.y.z-SNAPSHOT)

   "backups":[
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:26:29Z",
         "description":"my_ha_backup2",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"e1cb03fd-c108-4702-a04b-653491e41a91",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup2",
         "parent_id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
         "created":"2015-08-31T22:26:23Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/e1cb03fd-c108-4702-a04b-653491e41a91.xbstream.gz",
         "type":"InnoBackupExIncremental",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:22:52Z",
         "description":"my_ha_backup2",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"c6bbca39-e530-41f3-b073-03144dea04e3",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup2",
         "parent_id":null,
         "created":"2015-08-31T22:22:46Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/c6bbca39-e530-41f3-b073-03144dea04e3.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      },
      {
         "status":"COMPLETED",
         "updated":"2015-08-31T22:16:30Z",
         "description":"my_ha_backup1",
         "datastore":{
            "version":"5.6",
            "type":"mysql",
            "version_id":"1379cc8b-4bc5-4c4a-9e9d-7a9ad27c0866"
         },
         "id":"0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e",
         "size":0.18,
         "is_automated":0,
         "name":"ha-backup1",
         "parent_id":null,
         "created":"2015-08-31T22:16:25Z",
         "flavor_ram":1024,
         "instance_id":null,
         "source":{
            "type":"ha",
            "id":"130922a2-b9ab-4e95-86be-9c5d79171b5e"
         },
         "locationRef":"https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_938359/z_CLOUDDB_BACKUPS/0c1b5616-fdc5-45ae-b2dc-6f1440d55d0e.xbstream.gz",
         "type":"InnoBackupEx",
         "volume_size":1
      }
   ]
}

Create a copy of an existing backup in another region#

POST /{version}/{accountId}/backups/{backupId}/action

Creates a copy of the specified backup in another region, especially for disaster recovery purpose.

Note

  • The source and destination regions for backup copy operation can be DFW, IAD, ORD, HKG, SYD. The region of LON is not supported.

  • In the case of copying an incremental backup, a 400 Bad Request will return if the backup’s parent is not found in the destination region.

This table shows the possible response codes for this operation:

Response Code

Name

Description

202

Accepted

Request accepted.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

403

Forbidden

You are denied access to the requested resource.

404

Not Found

The requested item was not found.

405

badMethod

The specified method is not allowed for the given resource.

413

Over Limit

The number of items returned is above the allowed limit.

422

unprocessableEntity

The item cannot be processed.

500

instanceFault

The instance has experienced a fault.

501

notImplemented

The server does not support the functionality required to fulfill the request.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{accountId}

String

The account ID of the owner of the specified instance.

{backupId}

String

The backup ID.

Example Create backup copy: JSON request

POST /v1.0/1234/backups/ff44da4e-91eb-40ba-aa5b-841e1c308f55/action HTTP/1.1
Host: dfw.databases.api.rackspacecloud.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Content-Type: application/json
{
   "copy-backup":{
      "target_backup_region": "IAD",
      "description":"a backup copy",
      "name":"dfw-to-iad",
   }
}

Response#

Example Create backup copy: JSON response

HTTP/1.1 202 Accepted
Date: Fri, 13 Nov 2020 17:12:21 GMT
Content-Type: application/json
Date: Fri, 13 Nov 2020 17:12:21 GMT
Content-Length: 0