smart-core/db-dumper-bundle
A Symfony bundle that adds database dump and restore tooling to your application, with configurable connections and options for backing up, exporting, and restoring data from the console.
smart-core/db-dumper-bundle), not a Laravel package. It registers via config/bundles.php in a Symfony app (return ['SmartCore\DbDumperBundle\DbDumperBundle::class => ['all' => true]];), not via a Laravel ServiceProvider. In a Laravel app you cannot composer require and expect it to just work — you either run it inside a Symfony service container or shell out to its console command from Laravel.composer require smart-core/db-dumper-bundle. With 0 stars / 0 dependents, treat this as unvetted code. Read vendor/smart-core/db-dumper-bundle/ in full — the Command/ directory tells you the actual CLI entrypoint name (bin/console db:dump is the typical convention), and the DependencyInjection/Configuration.php defines the real option keys.mysqldump-php, druidfi/mysqldump-php) or shell out to mysqldump / pg_dump. Verify the binary exists on every host (which mysqldump) — that is your first failure mode.db:dump --env=dev producing something like var/dumps/<db>_<timestamp>.sql. Get that single command generating a restorable file before integrating anything into deployment or cron.app/Console/Kernel.php → $schedule->exec('bin/console db:dump --env=prod')->daily()->at('02:00'); Wrap it in a custom Artisan command (db:backup) that calls Symfony\Component\Process\Process so you can capture exit codes and pipe output. Do not try to invoke it as a native Artisan command — it is not one.php artisan migrate → keep the dump alongside the release artifact. This is the highest-value use: a known-good rollback point on every deploy.default, reporting, and legacy databases in the bundle's config (config/packages/db_dumper.yaml) rather than re-registering the service. If it only supports one connection, wrap multiple invocations in a loop script instead of hacking the bundle.services: mysql: job and invoke bin/console db:dump as a smoke test asserting (a) exit code 0, (b) output file non-empty, and (c) mysql < dump.sql reproduces the schema. This guards against the "dump runs but silently produces garbage" class of bug.php artisan db:snapshot) that owns env parsing, output-path conventions, and logging — then treats the Symfony command as a black box. This keeps day-to-day work in a familiar interface and gives you a single place to swap the underlying tool later.composer.json (no ^), commit the lock file, and keep the wrapper thin enough that replacing it is a day's work.DB_PASSWORD into command lines, which then appear in ps, shell history, and process logs. Pass credentials via environment or a temp defaults-file (--defaults-extra-file) rather than CLI arguments, and grep the bundle for how it builds its command string.mysqldump-based tools take a read lock by default. On live databases this can stall writes. Look for --single-transaction (InnoDB), --no-lock-tables, or a --quick pass-through. If the bundle does not expose these, it is a red flag for production use.$HOME, producing files in unexpected places. Always pass absolute --output/config paths.patches entry (via cweagans/composer-patches) so the patch is visible and version-pinned.spatie/laravel-backup or a direct mysqldump wrapper does the same job with an active maintainer base. Adopt this bundle only if you are already in a Symfony app that uses it — from a pure Laravel codebase, the integration cost and maintenance risk likely exceed the benefit.How can I help you explore Laravel packages today?