Skip to main content

backups

Creates, updates, deletes, gets or lists a backups resource.

Overview

Namebackups
TypeResource
Iddigitalocean.databases.backups

Fields

The following fields are returned by SELECT queries:

A JSON object with a key of database_backups.

NameDatatypeDescription
created_atstring (date-time)A time value given in ISO8601 combined date and time format at which the backup was created. (example: 2019-01-31T19:25:22Z)
size_gigabytesnumberThe size of the database backup in GBs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
databases_list_backupsselectdatabase_cluster_uuidTo list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to /v2/databases/$DATABASE_ID/backups.
Note: Backups are not supported for Caching or Valkey clusters.
The result will be a JSON object with a backups key. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
database_cluster_uuidstring (uuid)A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30)

SELECT examples

To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to /v2/databases/$DATABASE_ID/backups.
Note: Backups are not supported for Caching or Valkey clusters.
The result will be a JSON object with a backups key. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created.

SELECT
created_at,
size_gigabytes
FROM digitalocean.databases.backups
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}' -- required;