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.

npx dbdock init
init creates your initial configuration. It’s interactive — DBdock asks questions, you answer, and it generates the right files.

What it asks

  1. Database connection — host, port, user, database name
  2. Storage provider — local, S3, R2, or Cloudinary
  3. Storage credentials (for cloud providers)
  4. Encryption — enable/disable, generates a key if yes
  5. Compression — enable/disable, compression level
  6. Alerts — optional email (SMTP) and Slack setup

What it creates

Two files:

dbdock.config.json

Non-sensitive configuration. Commit this.

.env

Secrets. Never commit. Automatically added to .gitignore.
It also updates .gitignore to include .env, backups/, and *.backup.

Environment-only setup

If you prefer to skip the config file entirely, you can configure DBdock via environment variables alone. Set these in .env:
DBDOCK_DB_URL=postgresql://user:pass@host:5432/db
STORAGE_PROVIDER=s3
STORAGE_BUCKET=my-backups
DBDOCK_STORAGE_ACCESS_KEY=...
DBDOCK_STORAGE_SECRET_KEY=...
See the Configuration reference for the full list.

Re-running init

Running init again in a directory that already has a config file will ask whether to overwrite it. Existing values become defaults in the prompts, so you only need to change what you want to change.

After init

Verify setup

Run dbdock test to validate everything.

First backup

Run dbdock backup to create your first backup.