Description:

DigitalOcean Droplet backups are automatically created disk images that allow a Droplet to be restored to an earlier state or used to create a new Droplet. Backups can be configured with weekly, daily, or usage-based frequencies.


Rationale:

Enabling automated backups protects Droplet data and system configuration against accidental deletion, corruption, failed changes, or other operational incidents.


Impact:

Enabling backups incurs additional charges and consumes backup storage. The backup frequency and retention period should be selected according to the workload's recovery requirements.


Default Value:

Backups are disabled by default unless explicitly enabled during Droplet creation.


Pre-Requisite:

  1. Log in to DigitalOcean with sufficient permissions to manage Droplets.

  2. Identify the Droplets that require backups.

  3. Record the current backup configuration for backout purposes.


Remediation:

Enable automated backups for all Droplets that require system-level recovery.

Test Plan:

Via DigitalOcean Control Panel

  1. Log in to the DigitalOcean Control Panel.

  2. Go to Droplets.

  3. Select the Droplet being audited.

  4. Select Backups from the Droplet menu.

  5. Verify that automated backups are enabled.

  6. Verify that a backup schedule or backup policy is configured.

CLI

Check the backup policy:

doctl compute droplet backup-policies get <droplet_id>

The output includes BackupEnabled, backup plan, schedule, and retention information.

You can also check available backup images:

doctl compute droplet backups <droplet_id>

API

curl -s \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -H "Content-Type: application/json" \
  "https://api.digitalocean.com/v2/droplets/<droplet_id>/backups"

A Droplet should have backup images returned when backups have been enabled and backups have been created.


Implementation:

Via DigitalOcean Control Panel

  1. Go to Droplets.

  1. Select the required Droplet.

  1. Select Backups&Snapshots and Click Setup Automated Backups.

  1. Select the required backup frequency and retention settings.

  1. Click Enable Backups or Save Backup Settings.

CLI

Enable backups:

doctl compute droplet-action enable-backups <droplet_id>

By default, this enables a daily backup schedule.

To specify a weekly policy:

doctl compute droplet-action enable-backups <droplet_id> \
  --backup-policy-plan weekly \
  --backup-policy-weekday SUN \
  --backup-policy-hour 4

API

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{"type":"enable_backups"}' \
  "https://api.digitalocean.com/v2/droplets/<droplet_id>/actions"

DigitalOcean supports enabling backups on existing Droplets through the Droplet action API.

Backout Plan:

If backups need to be disabled:

Control Panel

  1. Go to Droplets.

  2. Select the Droplet.

  3. Open Backups.

  4. Click Disable Backups.

  5. Confirm the action.

Existing backups are retained until their scheduled deletion date after backups are disabled.

CLI

doctl compute droplet-action disable-backups <droplet_id>

API

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{"type":"disable_backups"}' \
  "https://api.digitalocean.com/v2/droplets/<droplet_id>/actions"

References:

  1. DigitalOcean — How to Enable Backups

  2. DigitalOcean — Backups Reference

  3. DigitalOcean — doctl Backup Policy Reference

  4. DigitalOcean — doctl Enable Backups

  5. DigitalOcean — How to Disable Backups