PHPackages                             hydrat-agency/laravel-db-dumper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hydrat-agency/laravel-db-dumper

ActiveLibrary

hydrat-agency/laravel-db-dumper
===============================

Brings db:export/db:import command to laravel for easier environment propagation

v1.1.0(2y ago)1631[1 issues](https://github.com/Hydrat-Agency/laravel-db-dumper/issues)MITPHPPHP &gt;=8.1

Since Oct 5Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Hydrat-Agency/laravel-db-dumper)[ Packagist](https://packagist.org/packages/hydrat-agency/laravel-db-dumper)[ Docs](https://github.com/hydrat-agency/laravel-db-dumper)[ RSS](/packages/hydrat-agency-laravel-db-dumper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

Laravel DB dumper
=================

[](#laravel-db-dumper)

Brings `db:export` and `db:import` artisan commands to Laravel, to easily copy database to another environment.

[![Latest Version on Packagist](https://camo.githubusercontent.com/2a3fc42f8b8299ce18a9ce1bd1b8e423703d44db9af48783ee1d40722c8b9ded/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6879647261742d6167656e63792f6c61726176656c2d64622d64756d7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hydrat-agency/laravel-db-dumper)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ab1435c64bd11ed7e9895fcfa96d0c19645d60d112dff2ca97f0baf8e18a3901/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6879647261742d6167656e63792f6c61726176656c2d64622d64756d7065722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/hydrat-agency/laravel-db-dumper/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f87c637410bf998bd4f02d9cd21853fc626903a8c0196afe48ab6384f5ee3a86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6879647261742d6167656e63792f6c61726176656c2d64622d64756d7065722f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/hydrat-agency/laravel-db-dumper/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f89c4bbb4b96cbc0ccbb903d5b0066d85f28ac4251b0528a276e5cb76c52930a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6879647261742d6167656e63792f6c61726176656c2d64622d64756d7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hydrat-agency/laravel-db-dumper)

Ever worked with Wordpress and used the WP-Cli ? How handful are `wp db:export` and `wp db:import` commands... 😻

This package brings the same functionality to Laravel. You can...

- ... export database to a SQL file :

```
❯ php artisan db:export /path/to/file.sql

Exporting database to /path/to/file.sql
Database exported successfully.
```

- ... import database from an SQL file :

```
❯ php artisan db:import /path/to/file.sql

Importing database from /path/to/file.sql
Database imported successfully.
```

This package uses [spatie/db-dumper](https://github.com/spatie/db-dumper) in the background to generate db exports.

Installation
------------

[](#installation)

This package requires php `>= 8.1` and laravel `>= 8.0`.

You can install the package via composer:

```
composer require hydrat-agency/laravel-db-dumper
```

Usage
-----

[](#usage)

### Supported databases

[](#supported-databases)

DatabaseExportImportMySQL✅✅MariaDB🅾️✅PostgreSQL🅾️🅾️SQLite🅾️✅SQL Server🅾️🅾️### Using Db Dumper from artisan CLI

[](#using-db-dumper-from-artisan-cli)

- Exporting to a file :

```
php artisan db:export /path/to/file.sql  # full path
php artisan db:export ../dump.sql        # relative path
```

ℹ If you don't provide a filename in your path, a name will be automatically generated :

```
❯ php artisan db:export

Exporting database to /path/to/project/dbname_2022-10-05_09-59-48.sql
Database exported successfully.
```

- Importing from a file :

```
php artisan db:import /path/to/file.sql  # full path
php artisan db:import ../dump.sql        # relative path
```

### Using Db Dumper from your code

[](#using-db-dumper-from-your-code)

```
# Using instance
$dumper = new Hydrat\LaravelDbDumper\LaravelDbDumper();
$dumper->dumpTo('path/to/file.sql', 'dbname');
$dumper->importFrom('path/to/file.sql');

# Using facade
use Hydrat\LaravelDbDumper\Facades\LaravelDbDumper;

LaravelDbDumper::dumpTo('path/to/file.sql', 'dbname');
LaravelDbDumper::importFrom('path/to/file.sql');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Feel free to contribute !

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you find any security vulnerabilities, please don't report it publicly.
Instead, contact me by private message or at .

Credits
-------

[](#credits)

- [Hydrat Agency](https://github.com/Hydrat-Agency)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~400 days

Total

2

Last Release

915d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7c605c71ebef94596a6c0f89e40a62e0d685b052288fe8a0017a0378c85823f?d=identicon)[tgeorgel](/maintainers/tgeorgel)

---

Top Contributors

[![tgeorgel](https://avatars.githubusercontent.com/u/11785727?v=4)](https://github.com/tgeorgel "tgeorgel (7 commits)")

---

Tags

laravelpackagelaravelhydrat-agencylaravel-db-dumper

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hydrat-agency-laravel-db-dumper/health.svg)

```
[![Health](https://phpackages.com/badges/hydrat-agency-laravel-db-dumper/health.svg)](https://phpackages.com/packages/hydrat-agency-laravel-db-dumper)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
