User Storage

This chapter describes details about the resource “objectstores” which represents an AWS S3 compatible bucket or Azure blob storage.

List supported providers and regions

This API can be used to find out the providers and regions that are currently supported by CloudCasa as backup target. Note that these only refer to what CloudCasa supports without users having to configure their own storage.

GET /api/v1/objectstores/provider-info

HTTP/1.1 200 OK

{
    "_items": [
        {
            "provider": "aws",
            "regions": [
                "us-east-1"
            ]
        }
    ]
}

User Objectstores

Users can configure their own storage to be used for backups. We support two kinds of objectstores.

  • S3 compatible objectstores.

    We tested with Digital Ocean, Backblaze, Wasabi, Google Storage, along with Amazon S3 in this category. Note that other S3 compatible storage might work as well though we haven’t tested.

  • Azure objectstores.

Creating an S3 compatible user Objectstore

POST /api/v1/objectstores

{
    "name": "test-objectstore",
    "provider_type": "aws",
    "bucket_name": "test-bucket",
    "region": "us-east-1",
    "s3provider": {
        "credentials": {
            "access_key": "<ACCESS_KEY>",
            "secret_key": "<SECRET_KEY>"
        },
        "endpoint": "https://sfo3.digitaloceanspaces.com"
    }
}

201 CREATED

{
    "_id": "6194a1b0f401181ac1aedc0a",
    "provider_type": "aws",
    "name": "test-objectstore",
    "bucket_name": "test-bucket",
    "region": "us-east-1",
    "s3provider": {
        "endpoint": "https://sfo3.digitaloceanspaces.com",
    },
    ...,
    "_updated": "Wed, 17 Nov 2021 06:31:12 GMT",
    "_created": "Wed, 17 Nov 2021 06:31:12 GMT",
    "_etag": "c9d7963fa84bd39c9bba2ffa0f215d5555de8db9",
    "_links": {
        "self": {
            "title": "Objectstore",
            "href": "/v1/objectstores/6194a1b0f401181ac1aedc0a"
        }
    }
}

Schema

name

Required. Name of the resource.

bucket_name

Required. Bucket Name for given s3 compatible provider. Note that different providers may call it with different names. For example, S3 bucket maps to “space” in DigitalOcean.

region

Only required for Amazon S3. Ignored for others.

endpoint

Required. Endpoint for the bucket. Must start with “https://”.

E.g. https://sfo3.digitaloceanspaces.com for a DigitalOcean space or https://s3.us-west-2.amazonaws.com.

access_key/secret_key

Required. Credentials to access the bucket.

We require permissions to invoke read, write, and list APIs on the bucket.

provider_type

Set it to “aws”.

List Objectstores

GET /api/v1/objectstores

Updating user Objectstores

PUT /api/v1/objectstores/<ID>

For S3 compatible objectstores, only “name”, “access_key” and “secret_key” can be updated.

Deleting an Objectstore

DELETE /api/v1/objectstores/<ID>

Deletion of an objectstore will fail if there are other resources referring to it or using it in some way. Here are the resources that can use an objectstore:

  • Recovery points

  • Running jobs

  • Copy definitions

  • Kubernetes clusters (if the objectstore is configured as backup target for this cluster).

  • Preferences (if the objectstore is configured as default backup target).