# Backups ## List **get** `/v2/droplets/{droplet_id}/backups` To retrieve any backups associated with a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/backups`. You will get back a JSON object that has a `backups` key. This will be set to an array of backup objects, each of which contain the standard Droplet backup attributes. ### Returns - **meta:** `MetaProperties` Information about the response itself. - **backups:** `array of object { id, created_at, min_disk_size, 4 more }` - **id:** `number` The unique identifier for the snapshot or backup. - **created\_at:** `string` A time value given in ISO8601 combined date and time format that represents when the snapshot was created. - **min\_disk\_size:** `number` The minimum size in GB required for a volume or Droplet to use this snapshot. - **name:** `string` A human-readable name for the snapshot. - **regions:** `array of string` An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. - **size\_gigabytes:** `number` The billable size of the snapshot in gigabytes. - **type:** `"snapshot" or "backup"` Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. - `"snapshot"` - `"backup"` - **links:** `PageLinks` ## List Policies **get** `/v2/droplets/backups/policies` To list information about the backup policies for all Droplets in the account, send a GET request to `/v2/droplets/backups/policies`. ### Returns - **meta:** `MetaProperties` Information about the response itself. - **links:** `PageLinks` - **policies:** `map[object { backup_enabled, backup_policy, droplet_id, next_backup_window } ]` A map where the keys are the Droplet IDs and the values are objects containing the backup policy information for each Droplet. - **backup\_enabled:** `boolean` A boolean value indicating whether backups are enabled for the Droplet. - **backup\_policy:** `DropletBackupPolicy` An object specifying the backup policy for the Droplet. - **droplet\_id:** `number` The unique identifier for the Droplet. - **next\_backup\_window:** `DropletNextBackupWindow` An object containing keys with the start and end times of the window during which the backup will occur. ## List Supported Policies **get** `/v2/droplets/backups/supported_policies` To retrieve a list of all supported Droplet backup policies, send a GET request to `/v2/droplets/backups/supported_policies`. ### Returns - **supported\_policies:** `array of object { name, possible_days, possible_window_starts, 2 more }` - **name:** `string` The name of the Droplet backup plan. - **possible\_days:** `array of string` The day of the week the backup will occur. - **possible\_window\_starts:** `array of number` An array of integers representing the hours of the day that a backup can start. - **retention\_period\_days:** `number` The number of days that a backup will be kept. - **window\_length\_hours:** `number` The number of hours that a backup window is open. ## Retrieve Policy **get** `/v2/droplets/{droplet_id}/backups/policy` To show information about an individual Droplet's backup policy, send a GET request to `/v2/droplets/$DROPLET_ID/backups/policy`. ### Returns - **policy:** `object { backup_enabled, backup_policy, droplet_id, next_backup_window }` - **backup\_enabled:** `boolean` A boolean value indicating whether backups are enabled for the Droplet. - **backup\_policy:** `DropletBackupPolicy` An object specifying the backup policy for the Droplet. - **droplet\_id:** `number` The unique identifier for the Droplet. - **next\_backup\_window:** `DropletNextBackupWindow` An object containing keys with the start and end times of the window during which the backup will occur.