2017 © Pedro Peláez
 

cakephp-plugin cakephp-database-backup

Database Backup plugin for CakePHP

image

mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  • Monday, July 2, 2018
  • by mirko-pagliai
  • Repository
  • 4 Watchers
  • 7 Stars
  • 3,181 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 22 Versions
  • 23 % Grown

The README.md

cakephp-database-backup

Software License CI codecov Codacy Badge CodeFactor, (*1)

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

Did you like this plugin? Its development requires a lot of time for me. Please consider the possibility of making a donation: even a coffee is enough! Thank you., (*3)

Make a donation, (*4)

Installation

You can install the plugin via composer:, (*5)

$ 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 Cookbook., (*6)

Simply, you can execute the shell command to enable the plugin:, (*7)

bin/cake plugin load DatabaseBackup

This would update your application's bootstrap method., (*8)

By default the plugin uses the APP/backups directory to save the backups files. So you have to create the directory and make it writable:, (*9)

$ mkdir backups/ && chmod 775 backups/

If you want to use a different directory, read the Configuration section., (*10)

Installation on older CakePHP and PHP versions

Recent packages and the master branch require at least CakePHP 5.0 and PHP 8.1 and the current development of the code is based on these and later versions of CakePHP and PHP.
However, there are still some branches compatible with previous versions of PHP., (*11)

For PHP 7.4 and CakePHP 4.0 later

Instead, the cakephp4 branch requires at least PHP >=7.4.0 and CakePHP ^4.0., (*12)

In this case, you can install the package as well:, (*13)

$ composer require --prefer-dist mirko-pagliai/cakephp-database-backup:dev-cakephp4

Note that the cakephp4 branch will no longer be updated as of January 05, 2024, except for security patches, and it matches the 2.12.3 version., (*14)

For CakePHP 3.0 and PHP 5.6 or later

Instead, the cakephp3 branch requires at least PHP >=5.6 <7.4 and CakePHP ^3.5.1., (*15)

In this case, you can install the package as well:, (*16)

$ composer require --prefer-dist mirko-pagliai/cakephp-database-backup:dev-cakephp3

Note that the cakephp3 branch will no longer be updated as of April 29, 2021, except for security patches, and it matches the 2.8.5 version., (*17)

Requirements

DatabaseBackup requires: * mysql and mysqldump for MySql databases; * pg_dump and pg_restore for Postgres databases; * sqlite3 for Sqlite databases., (*18)

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

The installation of these binaries may vary depending on your operating system., (*20)

Please forward, remember that the database user must have the correct permissions (for example, for mysql the user must have the LOCK TABLES permission)., (*21)

Configuration

The plugin uses some configuration parameters. See our wiki: * Configuration, (*22)

If you want to send backup files by email, remember to set up your application correctly so that it can send emails. For more information on how to configure your application, see the Cookbook., (*23)

How to use

See our wiki: * Export backups as cron jobs * How to use the BackupExport utility * How to use the BackupImport utility * How to use the BackupManager utility * How to use the BackupShell, (*24)

And refer to our API., (*25)

Testing

Tests are run for only one driver at a time, by default mysql. To choose another driver to use, you can set the driver_test environment variable before running phpunit., (*26)

For example:, (*27)

driver_test=sqlite vendor/bin/phpunit
driver_test=postgres vendor/bin/phpunit

Alternatively, you can set the db_dsn environment variable, indicating the connection parameters. In this case, the driver type will still be detected automatically., (*28)

For example:, (*29)

db_dsn=sqlite:///' . TMP . 'example.sq3 vendor/bin/phpunit

Versioning

For transparency and insight into our release cycle and to maintain backward compatibility, DatabaseBackup will be maintained under the Semantic Versioning guidelines., (*30)

The Versions

02/07 2018

dev-develop

dev-develop https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

12/06 2018

dev-master

9999999-dev https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

21/04 2018

dev-cakephp3.2

dev-cakephp3.2 https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

20/04 2018

dev-cakephp3.6

dev-cakephp3.6 https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

11/04 2018

2.5.0

2.5.0.0 https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

13/03 2018
18/02 2018
18/02 2018

dev-appveyor-test

dev-appveyor-test https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

18/02 2018

dev-appveyor

dev-appveyor https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

02/09 2017
02/09 2017
30/08 2017

dev-cakephp3.5

dev-cakephp3.5 https://github.com/mirko-pagliai/cakephp-database-backup

Database Backup plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mirko Pagliai

11/08 2017
24/07 2017
18/07 2017
13/07 2017
23/06 2017
06/06 2017
01/06 2017
21/03 2017
14/12 2016

1.0.1

1.0.1.0 https://github.com/mirko-pagliai/cakephp-mysql-backup

Mysql Backup plugin for CakePHP

  Sources   Download

AGPL

The Requires

 

The Development Requires

by Mirko Pagliai

15/11 2016

1.0.0

1.0.0.0 https://github.com/mirko-pagliai/cakephp-mysql-backup

Mysql Backup plugin for CakePHP

  Sources   Download

AGPL

The Requires

 

The Development Requires

by Mirko Pagliai