PHPackages                             mirko-pagliai/cakephp-database-backup - 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. mirko-pagliai/cakephp-database-backup

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

mirko-pagliai/cakephp-database-backup
=====================================

Database Backup plugin for CakePHP

3.0.4(3mo ago)2426.3k↓75.5%3[1 issues](https://github.com/mirko-pagliai/cakephp-database-backup/issues)MITPHPPHP &gt;=8.4CI passing

Since Nov 15Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/mirko-pagliai/cakephp-database-backup)[ Packagist](https://packagist.org/packages/mirko-pagliai/cakephp-database-backup)[ Docs](https://github.com/mirko-pagliai/cakephp-database-backup)[ RSS](/packages/mirko-pagliai-cakephp-database-backup/feed)WikiDiscussions 3.0.x Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (72)Used By (0)

cakephp-database-backup
=======================

[](#cakephp-database-backup)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![CI](https://github.com/mirko-pagliai/cakephp-database-backup/actions/workflows/ci.yml/badge.svg?branch=3.0.x)](https://github.com/mirko-pagliai/cakephp-database-backup/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/1e26fd2b9b9830e062b82eaf133e1d20b0a00f749043d6a11471e02824a7c8a6/68747470733a2f2f636f6465636f762e696f2f67682f6d69726b6f2d7061676c6961692f63616b657068702d64617461626173652d6261636b75702f6272616e63682f332e302e782f67726170682f62616467652e7376673f746f6b656e3d6e6b614a6b346e767573)](https://codecov.io/gh/mirko-pagliai/cakephp-database-backup)[![Codacy Badge](https://camo.githubusercontent.com/98550840d0dd72930d28ae21f99361625a98c55d8962c73484e4e528a2f12f78/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6364313232383463313034373433316338313439653039666135363533366266)](https://app.codacy.com/gh/mirko-pagliai/cakephp-database-backup/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)[![CodeFactor](https://camo.githubusercontent.com/446647f5ba51a0aee093fe2c865bb3ddcefce31f8771225f131c7c5283891118/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6d69726b6f2d7061676c6961692f63616b657068702d64617461626173652d6261636b75702f6261646765)](https://www.codefactor.io/repository/github/mirko-pagliai/cakephp-database-backup)

*DatabaseBackup* is a CakePHP plugin to export, import and manage database backups. Currently, the plugin supports *MySql*, *Postgres* and *Sqlite* databases.

Did you like this plugin? Its development requires a lot of time for me. Please consider the possibility of making [a donation](//paypal.me/mirkopagliai): even a coffee is enough! Thank you.

[![Make a donation](https://camo.githubusercontent.com/d9f2015fc776952b7d14005e3f0e18099924deeb096bffd93869762ebecde952/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f7765627374617469632f6d6b74672f6c6f676f2d63656e7465722f6c6f676f5f70617970616c5f63617274652e6a7067)](//paypal.me/mirkopagliai)

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

[](#requirements)

*DatabaseBackup* requires:

- `mariadb` and `mariadb-dump` for *MariaDB*/*MySql* databases (if you still use `mysql`/`mysqldump`, [see here](https://github.com/mirko-pagliai/cakephp-database-backup/blob/3.0.x/docs/Common%20issues.md#transition-from-mysql-and-mysqldump-to-mariadb-and-mariadb-dump));
- `pg_dump` and `pg_restore` for *Postgres* databases;
- `sqlite3` for *Sqlite* databases.

**Optionally**, if you want to handle compressed backups, `bzip2` and `gzip` are also required.

The installation of these binaries may vary depending on your operating system.

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

[](#installation)

You can install the plugin via composer:

```
composer require --prefer-dist mirko-pagliai/cakephp-database-backup
```

Then you have to load the plugin. For more information on how to load the plugin, please refer to the [CakePHP documentation](https://book.cakephp.org/5/en/plugins.html#loading-a-plugin).

You can execute the shell command to enable the plugin:

```
bin/cake plugin load DatabaseBackup
```

This would update your application's bootstrap method.

### Installation on older CakePHP and PHP versions

[](#installation-on-older-cakephp-and-php-versions)

Compared to the current installation requirements, some tags or branches are provided for those using older versions of CakePHP and PHP:

- `2.15` versions, which require at least CakePHP `5.0` and PHP `8.1`;
- tag [`cakephp4`](https://github.com/mirko-pagliai/cakephp-database-backup/releases/tag/cakephp4), which requires at least PHP `>=7.4.0` and CakePHP `^4.0`.
    This tag no longer receives any updates as of January 5, 2024, and roughly coincides with what `2.12.3` version was.
- tag [`cakephp3`](https://github.com/mirko-pagliai/cakephp-database-backup/releases/tag/cakephp3), which requires at least PHP `>=5.6
