Backups

Create a backup

Authorization

A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

Service Token Accesses write_backups

OAuth Scopes

ResourceScopes
Organizationwrite_backups
Databasewrite_backups
Branchwrite_backups
post/organizations/{organization}/databases/{database}/branches/{branch}/backups

Path parameters

organizationstring required

The name of the organization the branch belongs to

databasestring required

The name of the database the branch belongs to

branchstring required

The name of the branch

Request body

namestring

Name for the backup

retention_unit'hour' | 'day' | 'week' | 'month' | 'year'

Unit for the retention period of the backup

retention_valueinteger

Value between 1 and 1000 for the retention period of the backup (i.e retention_value 6 and retention_unit hour means 6 hours)

emergencyboolean

Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases.

Response

Returns the created database branch backup

idstring required

The ID of the backup

namestring required

The name of the backup

state'pending' | 'running' | 'success' | 'failed' | 'canceled' | 'ignored' required

The current state of the backup

sizeinteger required

The size of the backup in bytes

estimated_storage_costnumber required

The estimated storage cost of the backup

created_atstring required

When the backup was created

updated_atstring required

When the backup was last updated

started_atstring nullable required

When the backup started

expires_atstring nullable required

When the backup expires

completed_atstring nullable required

When the backup completed

deleted_atstring nullable required

When the backup was deleted

pvc_sizeinteger required

Size of the PVC used for the backup

uncompressed_sizeinteger required

The uncompressed (logical) size of the backup in bytes

protectedboolean required

Whether or not the backup is protected from deletion

requiredboolean required

Whether or not the backup policy is required

Changes

Changed in 4 of the 24 revisions of this API.2113

    • added the required property uncompressed_size to the response with the 201 status

      response-required-property-added

  • 72506953f367181See the full diff
    • the response property actor became nullable for the status 201

      response-property-became-nullable

    • the response property backup_policy became nullable for the status 201

      response-property-became-nullable

    • the response property backup_policy/last_ran_at became nullable for the status 201

      response-property-became-nullable

    • the response property backup_policy/next_run_at became nullable for the status 201

      response-property-became-nullable

    • the response property backup_policy/schedule_day became nullable for the status 201

      response-property-became-nullable

    • the response property backup_policy/schedule_week became nullable for the status 201

      response-property-became-nullable

    • the response property completed_at became nullable for the status 201

      response-property-became-nullable

    • the response property database_branch became nullable for the status 201

      response-property-became-nullable

    • the response property database_branch/deleted_at became nullable for the status 201

      response-property-became-nullable

    • the response property deleted_at became nullable for the status 201

      response-property-became-nullable

    • the response property expires_at became nullable for the status 201

      response-property-became-nullable

    • the response property restored_branches/items/deleted_at became nullable for the status 201

      response-property-became-nullable

    • the response property schema_snapshot became nullable for the status 201

      response-property-became-nullable

    • the response property schema_snapshot/linted_at became nullable for the status 201

      response-property-became-nullable

    • the response property started_at became nullable for the status 201

      response-property-became-nullable

    • the response property backup_policy became optional for the status 201

      response-property-became-optional

    • the response property database_branch became optional for the status 201

      response-property-became-optional

    • the response property schema_snapshot became optional for the status 201

      response-property-became-optional

    • added the required property backup_policy/display_name to the response with the 201 status

      response-required-property-added

    • the retention_value request property type/format changed from number/ to integer/

      request-property-type-changed

  • 5e881928d77a211See the full diff
    • the backup_policy/schedule_day response's property type/format changed from string/ to number/ for status 201

      response-property-type-changed

    • the backup_policy/schedule_week response's property type/format changed from string/ to number/ for status 201

      response-property-type-changed

    • removed the 0.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    • removed the 0.00 enum value from the backup_policy/schedule_week response property for the response status 201

      response-property-enum-value-removed

    • removed the 1.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    • removed the 1.00 enum value from the backup_policy/schedule_week response property for the response status 201

      response-property-enum-value-removed

    • removed the 2.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    • removed the 2.00 enum value from the backup_policy/schedule_week response property for the response status 201

      response-property-enum-value-removed

    • removed the 3.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    • removed the 3.00 enum value from the backup_policy/schedule_week response property for the response status 201

      response-property-enum-value-removed

    • removed the 4.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    • removed the 5.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    • removed the 6.00 enum value from the backup_policy/schedule_day response property for the response status 201

      response-property-enum-value-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog