Skip to main content
This guide takes you through setup, your first backup, and your first restore with the DBDock CLI. Total time: about 5 minutes.
Prefer a dashboard? Follow the Cloud Quickstart instead. Want both? Do this, then link the CLI to the cloud.
Haven’t installed DBDock yet? See the installation guide.

1. Initialize

Run init once in your project directory. It walks you through everything interactively.
It will ask for:
  • Database connection (host, port, user, database name)
  • Storage provider (local disk, S3, R2, or Cloudinary)
  • Encryption (recommended for cloud storage)
  • Alerts (optional — Slack and email)
Security-first by default. Non-sensitive config goes to dbdock.config.json (safe for git). Secrets go to .env, and .gitignore is updated automatically.

2. Create your first backup

You’ll see real-time progress:
The backup is encrypted (if enabled), compressed, and streamed directly to your configured storage.

3. Restore a backup

DBDock shows a list of backups and lets you pick one:
You can also restore into a different database. Pick “New Database Instance (Migrate)” when prompted and provide the target connection details — great for refreshing staging from production.

4. Verify everything works

Before trusting DBDock in production, run the self-test:
This checks:
  • Database connection
  • Storage provider access
  • Alert configuration (if enabled)

Environment-only setup (no config file)

Prefer not to commit a config file? Run DBDock entirely from environment variables:
Then:
See the configuration reference for all available variables.

What to do next

Explore commands

Every command, every flag, with examples.

Choose storage

S3, R2, Cloudinary, or local disk.

Set up alerts

Slack, email, or custom webhooks.

Schedule backups

Automated cron-based backups.