PHPackages                             lordsimal/cakephp-dump-sql - 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. [Database &amp; ORM](/categories/database)
4. /
5. lordsimal/cakephp-dump-sql

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

lordsimal/cakephp-dump-sql
==========================

A plugin to export SQL for CakePHP

2.2.0(4mo ago)44.6k↓43.1%MITPHPPHP &gt;=8.1CI passing

Since Dec 28Pushed 5d ago1 watchersCompare

[ Source](https://github.com/LordSimal/cakephp-dump-sql)[ Packagist](https://packagist.org/packages/lordsimal/cakephp-dump-sql)[ RSS](/packages/lordsimal-cakephp-dump-sql/feed)WikiDiscussions 2.x Synced today

READMEChangelog (6)Dependencies (4)Versions (11)Used By (0)

CakePHP Dump SQL plugin
=======================

[](#cakephp-dump-sql-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/7fcaaccaee914bf5660dde42b5574db67734239e7bd85f14169fad9b68f32733/68747470733a2f2f706f7365722e707567782e6f72672f6c6f726473696d616c2f63616b657068702d64756d702d73716c2f76)](https://packagist.org/packages/lordsimal/cakephp-dump-sql) [![Total Downloads](https://camo.githubusercontent.com/0d4cd8d74a55c96675e5d0bce45ae6510bd94082793da8798bbbc0f1269eb026/68747470733a2f2f706f7365722e707567782e6f72672f6c6f726473696d616c2f63616b657068702d64756d702d73716c2f646f776e6c6f616473)](https://packagist.org/packages/lordsimal/cakephp-dump-sql) [![Latest Unstable Version](https://camo.githubusercontent.com/3075661c7165f2f21f29385b6256e7b458b3bcb079b54ef9a32eac6522e5b50c/68747470733a2f2f706f7365722e707567782e6f72672f6c6f726473696d616c2f63616b657068702d64756d702d73716c2f762f756e737461626c65)](https://packagist.org/packages/lordsimal/cakephp-dump-sql) [![License](https://camo.githubusercontent.com/c4882d21303f28c350a603ac1ff786dbdc943622aa8cf430752a0d205feace9b/68747470733a2f2f706f7365722e707567782e6f72672f6c6f726473696d616c2f63616b657068702d64756d702d73716c2f6c6963656e7365)](https://packagist.org/packages/lordsimal/cakephp-dump-sql) [![PHP Version Require](https://camo.githubusercontent.com/14299dec7bc30e1a6e5a88af0a6a7b36b56b6b683d3e3d8b4613affdaae62aa1/68747470733a2f2f706f7365722e707567782e6f72672f6c6f726473696d616c2f63616b657068702d64756d702d73716c2f726571756972652f706870)](https://packagist.org/packages/lordsimal/cakephp-dump-sql) [![codecov](https://camo.githubusercontent.com/89c3403de5f2b7dff92723172e9925cd3a05189f985d850ab94ef4ef7403a353/68747470733a2f2f636f6465636f762e696f2f6769746875622f4c6f726453696d616c2f63616b657068702d64756d702d73716c2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d53344a4b4e3834535759)](https://codecov.io/github/LordSimal/cakephp-dump-sql)

This plugin adds a CakePHP command to easily generate SQL dumps of your configured datasources

Currently the following DBMS are integrated:

- MySQL/MariaDB
- SQLite
- PostgreSQL

Version table
-------------

[](#version-table)

PHPCakePHP1.x`^7.4 || ^8.0``^4.4`2.x`^8.1``^5.0`Installation
------------

[](#installation)

The recommended way to install this plugin via [composer](https://getcomposer.org) is:

```
composer require lordsimal/cakephp-dump-sql --dev

```

Then execute

```
bin/cake plugin load CakeDumpSql

```

**or** add this to your `src/Application.php` manually

```
public function bootstrap(): void
{
    parent::bootstrap();

    // Other plugins
    $this->addPlugin('CakeDumpSql');
}

```

Requirements
------------

[](#requirements)

For each DBMS you need to have its respective dump tool installed.

- MySQL =&gt; `mysqldump`
- MariaDB =&gt; `mariadb-dump`
- SQLite =&gt; `sqlite3`
- PostgreSQL =&gt; `pg_dump`

Warning

For `pg_dump` it is especially important that you have a compatible version installed. So e.g. if you have a **PostgreSQL 14 server** you need a **pg\_dump version 14** ⚠️

How to use
----------

[](#how-to-use)

After installing the plugin you now have a new command available to you:

```
bin/cake dump_sql

```

After executing that command you should see a SQL representation of your `default` datasource inside your console.

So if you want to save it into a file you should do

```
bin/cake dump_sql > dump.sql

```

### Dump different datasource

[](#dump-different-datasource)

You can specify which datasource you want to export via the first argument

```
bin/cake dump_sql test > test_dump.sql

```

### GZIP compressed dump

[](#gzip-compressed-dump)

Note

The following feature requires you have the **PHP zlib extension** installed and active️

```
bin/cake dump_sql --gzip > dump.sql.gz

```

### Data only dump

[](#data-only-dump)

```
bin/cake dump_sql --data-only > data.sql

```

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance89

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 89.4% 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 ~183 days

Recently: every ~147 days

Total

8

Last Release

2d ago

Major Versions

1.1 → 2.0.02023-09-10

1.x-dev → 2.2.02026-02-22

PHP version history (2 changes)1.0PHP &gt;=7.4

2.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![LordSimal](https://avatars.githubusercontent.com/u/9105243?v=4)](https://github.com/LordSimal "LordSimal (93 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")

---

Tags

pluginexportdumpsqlcakephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lordsimal-cakephp-dump-sql/health.svg)

```
[![Health](https://phpackages.com/badges/lordsimal-cakephp-dump-sql/health.svg)](https://phpackages.com/packages/lordsimal-cakephp-dump-sql)
```

###  Alternatives

[spatie/db-dumper

Dump databases

1.2k29.1M86](/packages/spatie-db-dumper)[dereuromark/cakephp-databaselog

A CakePHP plugin for storing and viewing application logs in the database

44172.5k2](/packages/dereuromark-cakephp-databaselog)[dereuromark/cakephp-shim

A CakePHP plugin to shim applications between major framework versions.

401.1M22](/packages/dereuromark-cakephp-shim)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)[rah/danpu

Zero-dependency MySQL dump library for easily exporting and importing databases

62414.3k11](/packages/rah-danpu)[dereuromark/cakephp-setup

A CakePHP plugin containing lots of useful management tools

36199.6k2](/packages/dereuromark-cakephp-setup)

PHPackages © 2026

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