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.
Interactive flow
Smart filtering
When you have many backups, DBdock offers filtering options:- Recent — last 10
- Date range — 24h, 7d, 30d, 90d, or custom
- Search — by keyword in the backup ID or by ID prefix
dbdock list for non-interactive filtering.
Restore destinations
At the start of the restore flow, DBdock asks where to restore:Current database
Restore into the database configured in
dbdock.config.json. Most common.New database instance
Restore into a different database. Great for staging refreshes or recovery drills.
Restoring to a different database
- Select a backup
- Pick “New Database Instance (Migrate)”
- Enter target connection: host, port, user, password, database name
- DBdock shows source stats and target database state, then asks for confirmation
dbdock copydb — see Staging refresh guide for common workflows.
What happens under the hood
- List — fetches backup metadata from storage
- Download — streams from storage (S3/R2/Cloudinary/local)
- Decrypt (if encrypted) — AES-256-GCM using
DBDOCK_ENCRYPTION_SECRET - Decompress (if compressed) — zstd
- Restore — runs
pg_restore(orpsqlfor plain format)
Gotchas
Target database must exist
DBdock doesn’t create the target database for you. If the database doesn’t exist:Target database should be empty (or you know what you’re doing)
pg_restore has --clean behavior which drops existing objects. For a completely clean restore, drop and recreate the target first.
Encryption key
Encrypted backups cannot be restored without the sameDBDOCK_ENCRYPTION_SECRET that created them. If you’re restoring to a new environment, copy the key first.

