Setup your development
Learn how to set up DBDock locally and start managing your backups.Prerequisites
Before you begin, ensure you have the following installed:- Node.js 18 or higher
- PostgreSQL 12 or higher
- PostgreSQL client tools (
pg_dump,pg_restore,psql)
Installing PostgreSQL client tools
Installing PostgreSQL client tools
Initialize DBDock (30 seconds)
Run once. The interactive setup walks you through database connection, storage (Local, S3, R2, Cloudinary), encryption, and optional Slack/Email alerts.- Saves non-sensitive config to
dbdock.config.json(safe for git) - Saves secrets to
.env(automatically gitignored) - Auto-updates
.gitignoreto exclude sensitive files
DBDOCK_DB_URL (or DATABASE_URL) and storage/encryption env vars in .env and use DBDock with env-only configuration.
Migrate legacy configs
Got secrets indbdock.config.json? Run npx dbdock migrate-config — it extracts them to .env, cleans up your config, and updates .gitignore. One command, done.
Create a backup
Once initialized, create your first backup. Real-time progress; streams directly to your storage. Done.Restore a backup
Run the restore command, pick a backup (smart filtering if you have lots), and DBDock handles download, decryption, decompression, and restore.Migrate to a New Database
You can also restore to a New Database Instance during the restore process. This is perfect for migrating data between servers:- Run
npx dbdock restore - Select a backup
- Choose “New Database Instance (Migrate)”
- Enter connection details for the target database
