spatie/db-dumper
PHP library to create database dumps via native CLI tools. Supports MySQL, MariaDB, PostgreSQL, SQLite, and MongoDB, wrapping mysqldump/mariadb-dump/pg_dump/sqlite3/mongodump with a simple fluent API.
AUTO_INCREMENT for test environments).dumpToStorage().Adopt if:
AUTO_INCREMENT, or including routines).mysqldump, pg_dump) or GUI tools.Compressor interface.Look elsewhere if:
mysqldump, pg_dump, etc.) or compression tools (gzip, bzip2)."This package lets us automate database backups programmatically—no more manual exports or third-party tools. It supports all our databases (MySQL, PostgreSQL, etc.), lets us exclude sensitive data (like logs), and can compress backups for storage efficiency. This reduces downtime risks, simplifies deployments, and cuts costs by eliminating reliance on external backup services. For example, we can schedule nightly dumps to S3 and use selective exports for analytics without manual effort."
*"Spatie’s db-dumper is a lightweight, Laravel-friendly way to generate database dumps with granular control:
AUTO_INCREMENT, or dump only specific tables.mysqldump, etc.) to be installed, but we can containerize this if needed."**"This replaces ad-hoc backup scripts with a deterministic, version-controlled approach:
artisan db:dump).skipAutoIncrement for tests).database_dumps table."*How can I help you explore Laravel packages today?