Skip to main content
DBdock can send notifications when a backup completes (success or failure). Alerts work for both CLI backups and programmatic backups — the system reads from the same alerts config in either mode.

Channels

Email

SMTP via Gmail, SendGrid, AWS SES, Mailgun, or any provider.

Slack

Incoming webhooks — 2-minute setup.

Custom webhooks

Any HTTP endpoint — Discord, WhatsApp, your own service.

Scheduling

Run backups on a cron schedule.

When alerts fire

Every completed backup triggers an alert, whether it succeeded or failed.

On success

Alert includes:
  • Backup ID
  • Database name
  • Size (original and compressed)
  • Duration
  • Storage location
  • Encryption status

On failure

Alert includes:
  • Error message
  • Database details
  • Timestamp
  • Troubleshooting tip (based on the error)

Configuration

All alerts are configured in dbdock.config.json:
Secrets (SMTP password, Slack webhook URL) go in .env:

Testing alerts

Sends a test notification to each enabled channel without creating a backup.

Delivery behavior

Alerts are sent asynchronously — they never block backup completion. If an alert delivery fails, the backup still succeeds and the failure is logged.

Best practices

  • Route failures to an on-call channel. Successes are nice-to-have; failures need eyes on them fast.
  • Don’t wire backups into a noisy channel. A 100-person #general gets ignored.
  • Use email for batch reports, Slack for real-time. Set email for weekly summaries, Slack for immediate failures.
  • Test after setup. Run dbdock test to confirm delivery before trusting the alerts.

See also

Email setup

Configure SMTP.

Slack setup

2-minute webhook setup.