DBSafeDump CLI Tool
DBSafeDump is a command-line interface (CLI) tool designed for securely dumping and anonymizing database data to ensure compliance with privacy regulations like GDPR. Currently at version 1.0.4, the package enables users to export databases with automatic sensitive data masking, migrate data between environments while anonymizing, and even scrub existing databases in-place. Its key differentiators include deterministic masking for consistent test data, support for multiple database types (MySQL, PostgreSQL, MSSQL, SQLite), and intelligent discovery of sensitive columns. It operates on a freemium model, with a free tier limited to 1,000 rows per table and paid tiers offering advanced features like unlimited rows, in-place scrubbing, and CI/CD integration. The tool is developed with a focus on automation and integration into CI/CD pipelines, requiring Node.js 18+ for execution. While the free tier works offline, paid licenses require periodic online verification through a device fingerprint.
Common errors
-
Error: Row limit exceeded. Please upgrade to a paid plan.
cause Attempting to dump or import more than 1,000 rows per table using the FREE tier.fixPurchase and activate a STARTER or PRO license, or filter your data to stay within the 1,000-row limit for free usage. -
Error: Configuration file 'config.yml' not found. Run 'dbsafedump init'.
cause DBSafeDump commands were run without an initialized configuration file.fixExecute `dbsafedump init` to create the default `config.yml` and configure your database connections interactively. -
Error: Node.js version x.y.z is not supported. Please use Node.js >=18.
cause The installed Node.js version on your system is older than the required minimum of 18.fixUpdate your Node.js installation to version 18 or newer. Consider using `nvm` (Node Version Manager) to manage different Node.js versions. -
Error: Invalid license key provided. Please check your key and try again.
cause An incorrect or expired license key was entered during activation.fixVerify your license key for typos and ensure it is valid and active. If issues persist, contact DBSafeDump support.
Warnings
- breaking The `scrub` command performs in-place anonymization directly on your database. This is a destructive and irreversible operation that permanently alters data.
- gotcha The FREE tier of DBSafeDump is limited to 1,000 rows per table. Operations exceeding this limit will fail until a paid license is activated.
- gotcha DBSafeDump requires Node.js version 18 or newer to run. Using older versions will result in execution errors.
- gotcha Paid DBSafeDump licenses (STARTER/PRO) require periodic online verification. This process collects a hashed device fingerprint locally for license activation and verification, sending only the encrypted key to the server.
Install
-
npm install dbsafedump -
yarn add dbsafedump -
pnpm add dbsafedump
Imports
- dbsafedump dump
import { dump } from 'dbsafedump'dbsafedump dump -o backup.sql
- dbsafedump init
require('dbsafedump').init()dbsafedump init
- dbsafedump scrub
DBSafeDump.scrubDatabase()
dbsafedump scrub --ci
Quickstart
npm install -g dbsafedump dbsafedump init # Follow interactive prompts to configure database connections dbsafedump test-connection # Verify database connection dbsafedump dump -o anonymized_data.sql # Dumps the configured database with anonymization to a SQL file