Download the PHP package mirko-pagliai/cakephp-database-backup without Composer
On this page you can find all versions of the php package mirko-pagliai/cakephp-database-backup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mirko-pagliai/cakephp-database-backup
More information about mirko-pagliai/cakephp-database-backup
Files in mirko-pagliai/cakephp-database-backup
Package cakephp-database-backup
Short Description Database Backup plugin for CakePHP
License MIT
Homepage https://github.com/mirko-pagliai/cakephp-database-backup
Informations about the package cakephp-database-backup
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: even a coffee is enough! Thank you.
Requirements
DatabaseBackup requires:
mariadb
andmariadb-dump
for MariaDB/MySql databases (previouslymysql
andmysqldump
);pg_dump
andpg_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
You can install the plugin via composer:
Then you have to load the plugin. For more information on how to load the plugin, please refer to the CakePHP documentation.
Simply, you can execute the shell command to enable the plugin:
This would update your application's bootstrap method.
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:
If you want to use a different directory, read the Configuration page.
Installation on older CakePHP and PHP versions
Compared to the current installation requirements, some tags are provided for those using older versions of CakePHP and PHP (until February 7, 2025, they were available as branches, now only as tags):
- 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 what2.12.3
version was. - tag
cakephp3
, which requires at least PHP>=5.6 <7.4
and CakePHP^3.5.1
.
This tag no longer receives any updates as of April 29, 2021, and roughly coincides with what2.8.5
version was.
You can freely use these tags, even by downloading the source codes from the attached assets, but their functioning is no longer guaranteed, especially regarding old dependencies that may no longer be available.
Configuration and How to use
See our wiki.
Before opening an issue, check this list of common issues.
Testing
Normally tests are only run on one driver at a time, by default mysql
.
To run tests with another driver, you can use the scripts defined in composer.json
:
For example:
Instead, to run tests with all drivers, you can use the test-all
script (individual tests are chained together).
For individual drivers, alternatively you can set the db_dsn
environment variable, indicating the connection
parameters. In this case, the driver type will still be detected automatically.
For example:
Versioning
For transparency and insight into our release cycle and to maintain backward compatibility, DatabaseBackup will be maintained under the Semantic Versioning guidelines.
All versions of cakephp-database-backup with dependencies
cakephp/cakephp Version ^5.1
league/container Version ^4.2.3
symfony/filesystem Version ^6.4.1|^7.2
symfony/process Version ^7.1.7