DBDock: Database Backup, Restore, and Migration

1.1.26 · active · verified Wed Apr 22

DBDock is an enterprise-grade, CLI-first tool designed for comprehensive database operations, including backup, restore, cross-database migration (MongoDB ↔ PostgreSQL), and database copying. Currently at version 1.1.26, it offers a streamlined approach to repetitive database tasks, aiming to replace custom scripts with single commands. Key differentiators include its 'beautiful CLI' with real-time progress, built-in AES-256 encryption, Brotli compression, and support for multiple cloud storage providers like S3, R2, and Cloudinary. It provides interactive setup, intelligent filtering for operations like restore, and features like retention policies and email/Slack alerts. While primarily a command-line utility, DBDock also offers a programmatic TypeScript API, particularly for integration within NestJS applications, leveraging its peer dependencies on `@nestjs/common` and `@nestjs/core`. This allows developers to embed its powerful features directly into their Node.js applications and manage features like cron schedules programmatically.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates the initial setup process and fundamental backup/restore operations using the CLI.

npx dbdock init
# Follow the interactive prompts to set up database connection, storage, encryption, and alerts.
# This creates dbdock.config.json (non-sensitive) and .env (secrets).

# Create a full backup with encryption and compression, streaming directly to configured storage.
# Real-time progress is shown in the terminal.
npx dbdock backup

# Restore a backup interactively, with smart filtering for many backups.
npx dbdock restore

view raw JSON →