Cluster backup

List cluster backups and get pgBackRest configuration.

Backups are initiated automatically on a daily basis, and retained for about a week. New backups can be requested through the start backup endpoint.

Part of the API reference collection

This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.

List backups

List available backups for a cluster.

This endpoint's pagination may be ordered through the order_field parameter by name only.

GET /clusters/{cluster_id}/backups


Path parameters

  • cluster_id: ID of the cluster for which to get backups for.

Query parameters


Return only items starting after this cursor ID. When paginating, pass the value of next_cursor from the last page into this field to get the next one.


The maximum number of items to return on the page. Defaults to 100 with a minimum of 1 and a maximum of 100.


The order of pagination. asc for ascending or desc for descending. Defaults to asc.

Enum asc, or desc.


The name of the field on which to paginate like id or name. Supported fields are specific to each endpoint, and it's not possible to specify any arbitrary name. See the documentation for each specific list endpoint to see which fields it supports. Defaults to id for most resources.

cURL example

curl -X GET{cluster_id}/backups
    -H "Authorization: Bearer $CRUNCHY_API_KEY"


Status: 200

Response for a list of cluster backups.

Content type: application/json

backupsarray of array

The list of cluster backups.


    "backups": [
            "finished_at": "2022-05-07T01:00:02Z",
            "lsn_start": "AE0/9E000028",
            "lsn_stop": "AE0/A0051F10",
            "name": "2020/20200913-195337F",
            "size_bytes": 1852406161,
            "started_at": "2022-05-07T01:02:36Z"

Create backup token

Create backup token for configuring pgBackRest to restore from a cluster backup.

The endpoint returns configuration for a cloud provider's blob store (e.g. like Amazon's S3) which is the location of a pgBackRest repository. Configuring pgBackRest with this information will allow it to restore from the cluster's backups which are generated periodically as part of normal operation.

POST /clusters/{cluster_id}/backup-tokens


Path parameters

  • cluster_id: ID of the cluster to create a backup token for.

cURL example

curl -X POST{cluster_id}/backup-tokens
    -H "Authorization: Bearer $CRUNCHY_API_KEY"


Status: 201

Content type: application/json

idstring in EID format

The primary ID of the backup token. Note that backup tokens aren't persisted in Bridge, so this can be used as a convenient way to uniquely identify a backup token, but not for much else.

awsobject of type AWSBackupTokenobject

AWS pgBackRest credentials.

Set for a cluster that's on the AWS provider, and omitted otherwise.

azureobject of type AzureBackupTokenobject

Azure pgBackRest credentials.

Set for a cluster that's on the Azure provider, and omitted otherwise.

cluster_idstring in EID format

The ID of the associated cluster.


The pgBackRest repository path.


The name of the configuration section for the target cluster in pgBackRest (pgBackRest supports multiple stanzas, but in practice there will only be one for a Bridge cluster). This name could be inferred through the use of other configuration parameters, but putting its value here allows pgBackRest to be configured locally more easily.

team_idstring in EID format

The ID of the team which owns the associated cluster.

typeenum string

Type of storage used for the repository and which to be used for pgBackRest configuration. azure for Azure Blob Storage Service, or s3 for AWS Simple Storage Service.

Enum azure, or s3.


    "aws": {
        "s3_bucket": "the-bucket",
        "s3_key": "key",
        "s3_key_secret": "secret",
        "s3_kms_key_id": null,
        "s3_region": "us-west-1",
        "s3_token": "token"
    "cluster_id": "rvf73a77ozfsvcttryebfrnlem",
    "id": "agaqf6fanse45vspjcctakuyky",
    "repo_path": "/the-path",
    "stanza": "2qc6yv2ztfcw7a7yoripu4zlsm",
    "team_id": "eaevtjiudzeq7bsqbbpiscund4",
    "type": "s3"

The AWSBackupToken object

pgBackRest configuration relevant for a cluster hosted on AWS.


S3 bucket used to store the repository.


S3 repository access key.


S3 repository secret access key.


AWS KMS (Key Management Service) key used for at-rest encryption of the S3 repository.


S3 repository region.


S3 repository security token.

The AzureBackupToken object

pgBackRest configuration relevant for a cluster hosted on Azure.


Azure account used to store the repository.


Azure container used to store the repository.


Azure repository key.

azure_key_typeenum string

Azure repository key type.

The following types are supported for authorization: * shared - Shared key * sas - Shared access signature

Enum sas, or shared.