backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | digitalocean.databases.backups |
Fields
The following fields are returned by SELECT
queries:
- databases_list_backups
A JSON object with a key of database_backups
.
Name | Datatype | Description |
---|---|---|
created_at | string (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_gigabytes | number | The size of the database backup in GBs. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
databases_list_backups | select | database_cluster_uuid | 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. |
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.
Name | Datatype | Description |
---|---|---|
database_cluster_uuid | string (uuid) | A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30) |
SELECT
examples
- databases_list_backups
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;