@@ -15,16 +15,29 @@ even a coffee is enough! Thank you.
1515
1616[ ![ Make a donation] ( https://www.paypalobjects.com/webstatic/mktg/logo-center/logo_paypal_carte.jpg )] ( //paypal.me/mirkopagliai )
1717
18+ * [ Requirements] ( #requirements )
1819 * [ Installation] ( #installation )
1920 + [ Installation on older CakePHP and PHP versions] ( #installation-on-older-cakephp-and-php-versions )
20- - [ For PHP 7.4 and CakePHP 4.0 later] ( #for-php-74-and-cakephp-40-later )
21- - [ For CakePHP 3.0 and PHP 5.6 or later] ( #for-cakephp-30-and-php-56-or-later )
22- * [ Requirements] ( #requirements )
2321 * [ Configuration] ( #configuration )
2422 * [ How to use] ( #how-to-use )
2523 * [ Testing] ( #testing )
2624 * [ Versioning] ( #versioning )
2725
26+ ## Requirements
27+ * DatabaseBackup* requires:
28+ * ` mysql ` and ` mysqldump ` for * MySql* databases;
29+ * ` pg_dump ` and ` pg_restore ` for * Postgres* databases;
30+ * ` sqlite3 ` for * Sqlite* databases.
31+
32+ ** Optionally** , if you want to handle compressed backups, ` bzip2 ` and ` gzip ` are
33+ also required.
34+
35+ The installation of these binaries may vary depending on your operating system.
36+
37+ Please forward, remember that the database user must have the correct
38+ permissions (for example, for ` mysql ` the user must have the ` LOCK TABLES `
39+ permission).
40+
2841## Installation
2942You can install the plugin via composer:
3043
@@ -37,11 +50,11 @@ please refer to the [Cookbook](//book.cakephp.org/4.0/en/plugins.html#loading-a-
3750
3851Simply, you can execute the shell command to enable the plugin:
3952``` bash
40- bin/cake plugin load DatabaseBackup
53+ $ bin/cake plugin load DatabaseBackup
4154```
4255This would update your application's bootstrap method.
4356
44- By default the plugin uses the ` APP/backups ` directory to save the backups
57+ By default, the plugin uses the ` APP/backups ` directory to save the backups
4558files. So you have to create the directory and make it writable:
4659
4760``` bash
@@ -51,50 +64,19 @@ $ mkdir backups/ && chmod 775 backups/
5164If you want to use a different directory, read the [ Configuration] ( #configuration ) section.
5265
5366### Installation on older CakePHP and PHP versions
54- Recent packages and the master branch require at least CakePHP 5.0 and PHP 8.1 and the current development of the code
55- is based on these and later versions of CakePHP and PHP.
56- However, there are still some branches compatible with previous versions of PHP.
57-
58- #### For PHP 7.4 and CakePHP 4.0 later
59- Instead, the [ cakephp4] ( //github.com/mirko-pagliai/cakephp-database-backup/tree/cakephp4 ) branch requires at least PHP
60- ` >=7.4.0 ` and CakePHP ` ^4.0 ` .
6167
62- In this case, you can install the package as well:
63- ``` bash
64- $ composer require --prefer-dist mirko-pagliai/cakephp-database-backup:dev-cakephp4
65- ```
68+ Compared to the current installation requirements, some tags are provided for those using older versions of CakePHP and
69+ PHP (until February 7, 2025, they were available as branches, now only as tags):
6670
67- Note that the ` cakephp4 ` branch will no longer be updated as of January 05, 2024,
68- except for security patches, and it matches the
69- [ 2.12.3] ( //github.com/mirko-pagliai/cakephp-database-backup/releases/tag/2.12.3 ) version.
71+ - tag [ ` cakephp4 ` ] ( https://github.com/mirko-pagliai/cakephp-database-backup/releases/tag/cakephp4 ) , which requires at
72+ least PHP ` >=7.4.0 ` and CakePHP ` ^4.0 ` .
73+ This tag no longer receives any updates as of January 5, 2024, and roughly coincides with what ` 2.12.3 ` version was.
74+ - tag [ ` cakephp3 ` ] ( https://github.com/mirko-pagliai/cakephp-database-backup/releases/tag/cakephp3 ) , which requires at
75+ least PHP ` >=5.6 <7.4 ` and CakePHP ` ^3.5.1 ` .
76+ This tag no longer receives any updates as of April 29, 2021, and roughly coincides with what ` 2.8.5 ` version was.
7077
71- #### For CakePHP 3.0 and PHP 5.6 or later
72- Instead, the [ cakephp3] ( //github.com/mirko-pagliai/cakephp-database-backup/tree/cakephp3 ) branch requires at least PHP
73- ` >=5.6 <7.4 ` and CakePHP ` ^3.5.1 ` .
74-
75- In this case, you can install the package as well:
76- ``` bash
77- $ composer require --prefer-dist mirko-pagliai/cakephp-database-backup:dev-cakephp3
78- ```
79-
80- Note that the ` cakephp3 ` branch will no longer be updated as of April 29, 2021,
81- except for security patches, and it matches the
82- [ 2.8.5] ( //github.com/mirko-pagliai/cakephp-database-backup/releases/tag/2.8.5 ) version.
83-
84- ## Requirements
85- * DatabaseBackup* requires:
86- * ` mysql ` and ` mysqldump ` for * MySql* databases;
87- * ` pg_dump ` and ` pg_restore ` for * Postgres* databases;
88- * ` sqlite3 ` for * Sqlite* databases.
89-
90- ** Optionally** , if you want to handle compressed backups, ` bzip2 ` and ` gzip ` are
91- also required.
92-
93- The installation of these binaries may vary depending on your operating system.
94-
95- Please forward, remember that the database user must have the correct
96- permissions (for example, for ` mysql ` the user must have the ` LOCK TABLES `
97- permission).
78+ You can freely use these tags, even by downloading the source codes from the attached assets, but their functioning is
79+ no longer guaranteed, especially regarding old dependencies that may no longer be available.
9880
9981## Configuration
10082The plugin uses some configuration parameters. See our wiki:
0 commit comments