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.
pg_dump, optionally compresses and encrypts the output, and streams it directly to your configured storage provider. You’ll see real-time progress:
Options
| Option | Description |
|---|---|
--encrypt | Force encryption on (overrides config) |
--no-encrypt | Force encryption off (overrides config) |
--compress | Force compression on (overrides config) |
--no-compress | Force compression off (overrides config) |
--encryption-key <key> | Use a specific 64-char hex key for this backup |
--compression-level <1-11> | zstd compression level (default 6) |
Examples
Standard backup
Uses everything from your config file:Force maximum compression
Fast backup, no compression
One-off with explicit encryption key
DBDOCK_ENCRYPTION_SECRET just for this run.
Backup formats
The format comes fromdbdock.config.json:
| Format | Extension | Notes |
|---|---|---|
custom (default) | .sql | Binary, pg_dump’s native compression, selective restore |
plain | .sql | Human-readable SQL, works with psql directly |
directory | .dir | Parallel dump support for huge DBs |
tar | .tar | Tar archive of directory format |
What happens under the hood
- Connect — validates database credentials
- Dump — runs
pg_dumpwith your configured format - Compress (if enabled) — zstd at configured level
- Encrypt (if enabled) — AES-256-GCM with key derived from secret
- Upload — streams to your storage provider, no temp files
- Record metadata — size, duration, flags, storage key
- Send alerts (if configured) — Slack/email
- Retention (if
runAfterBackup: true) — cleanup old backups
After the backup
Generating an encryption key
.env as DBDOCK_ENCRYPTION_SECRET. See Security for key management.
