Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dbdock.xyz/llms.txt

Use this file to discover all available pages before exploring further.

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:
{
  "alerts": {
    "email": {
      "enabled": true,
      "smtp": { "host": "...", "port": 587, "secure": false },
      "from": "backups@yourapp.com",
      "to": ["admin@yourapp.com"]
    },
    "slack": {
      "enabled": true,
      "webhookUrl": "https://hooks.slack.com/services/..."
    }
  }
}
Secrets (SMTP password, Slack webhook URL) go in .env:
DBDOCK_SMTP_USER=your-smtp-user
DBDOCK_SMTP_PASS=your-smtp-password
DBDOCK_SLACK_WEBHOOK=https://hooks.slack.com/services/...

Testing alerts

npx dbdock test
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.