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.
Basic usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
format | 'custom' | 'plain' | 'directory' | 'tar' | from config | PostgreSQL backup format |
compress | boolean | from config | Apply zstd compression |
encrypt | boolean | from config | AES-256-GCM encryption |
type | 'full' | 'schema' | 'data' | 'full' | What to back up |
dbdock.config.json. Pass only the ones you want to override.
Result shape
Examples
Schema-only backup
Data-only backup
Plain SQL backup
grep, inspect, or feed to psql. Usually much larger than custom format.
Maximum compression for archival
One-off unencrypted backup
Error handling
createBackup are standard Error instances with a .code property for structured handling.
Alerts are automatic
If alerts are configured indbdock.config.json, they fire after createBackup — success or failure. You don’t need to do anything extra.
See SDK → alerts if you want to send alerts manually.
Performance tips
Large databases
Stream the output — which DBdock does by default — so you never buffer the whole dump. Avoid callingcreateBackup concurrently against the same database; PostgreSQL will serialize the dumps anyway and you’ll waste resources.
Remote databases with slow links
Run the backup process on a machine near the database, not near your storage. The dump is usually 2-10x larger than the compressed/encrypted output, so it’s cheaper to dump locally and upload than to dump across the internet.Monitoring
Measureresult.metadata.duration and alert if it drifts. Backup duration is a good proxy for database health.
See also
Listing backups
Query the backup history.
Scheduling
Run on a schedule.
Alerts
Programmatic alerts.

