spatie/db-dumper
PHP database dump helper that wraps native tools (mysqldump, mariadb-dump, pg_dump, sqlite3, mongodump). Supports MySQL/MariaDB, PostgreSQL, SQLite, and MongoDB with a fluent API to configure credentials and dump to SQL or gz files.
users or products tables) for analytics, reporting, or partial migrations.column_statistics.Roadmap Alignment:
Adopt when:
schedule:run) to trigger backups on cron.Look elsewhere if:
mysqldump --where or specialized packages like spatie/laravel-backup.pg_basebackup).mysqldump, pg_dump, etc.)—this package delegates to them.For Executives: "This package automates database backups and migrations, reducing deployment risks and manual errors. For example, it can generate environment-specific dumps (e.g., prod without PII) and integrate with our CI/CD pipeline to sync databases between dev/staging/prod. It’s a lightweight, open-source solution that replaces ad-hoc scripts, saving engineering time and improving reliability."
For Engineering:
*"Spatie’s db-dumper lets us programmatically create database backups in Laravel with granular control—exclude tables, skip auto-increments, or compress outputs. It’s a thin wrapper around native tools (mysqldump, pg_dump) but adds Laravel-friendly methods (e.g., includeTables(['users', 'products'])). Perfect for:
For DevOps:
*"This replaces manual mysqldump commands with a Laravel service, ensuring consistency and auditability. Key benefits:
Artisan::schedule() (e.g., nightly backups).column_statistics table..sql.gz for efficient cloud storage (e.g., S3).
Example use case: Sync a staging database to prod by dumping only schema changes, then applying them via db:seed."*How can I help you explore Laravel packages today?