Setup your development
Learn how to set up DBdocks 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 DBdocks
Run the interactive setup wizard to create your secure configuration.- Database connection: Host, port, credentials.
- Storage provider: Local, S3, R2, or Cloudinary.
- Encryption/Compression: Security settings.
- Email and Slack alerts: Optional notification settings.
- Saves non-sensitive config to
dbdock.config.json(safe for git) - Saves secrets to
.env(automatically gitignored) - Auto-updates
.gitignoreto exclude sensitive files
Migrate Legacy Configurations
If you have an existing configuration with secrets embedded indbdock.config.json, migrate to the secure approach:
.env, and updates your config to use environment variables.
Create a Backup
Once initialized, you can create your first backup immediately.Restore a Backup
Restoring is just as easy. Run the restore command to see a list of available backups.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
