Skip to content

Commit

Permalink
the README file has been updated for compatibility with older versi…
Browse files Browse the repository at this point in the history
…ons of CakePHP and PHP (branches have been

    removed and older versions are available as tags)
  • Loading branch information
mirko-pagliai committed Feb 8, 2025
1 parent 52918f2 commit da50277
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 108 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 2.x branch
## 2.13 branch
### 2.13.4
* the `README` file has been updated for compatibility with older versions of CakePHP and PHP (branches have been
removed and older versions are available as tags).

### 2.13.3
* added `--reverse` option for the `IndexCommand` ([issue #96](https://github.com/mirko-pagliai/cakephp-database-backup/issues/96));
* the `BackupTrait::getAbsolutePath()` method is now able to recognize a path relative to its `ROOT`, so as to be able
Expand Down
74 changes: 28 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,29 @@ even a coffee is enough! Thank you.

[![Make a donation](https://www.paypalobjects.com/webstatic/mktg/logo-center/logo_paypal_carte.jpg)](//paypal.me/mirkopagliai)

* [Requirements](#requirements)
* [Installation](#installation)
+ [Installation on older CakePHP and PHP versions](#installation-on-older-cakephp-and-php-versions)
- [For PHP 7.4 and CakePHP 4.0 later](#for-php-74-and-cakephp-40-later)
- [For CakePHP 3.0 and PHP 5.6 or later](#for-cakephp-30-and-php-56-or-later)
* [Requirements](#requirements)
* [Configuration](#configuration)
* [How to use](#how-to-use)
* [Testing](#testing)
* [Versioning](#versioning)

## Requirements
*DatabaseBackup* requires:
* `mysql` and `mysqldump` for *MySql* databases;
* `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.

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

## Installation
You can install the plugin via composer:

Expand All @@ -37,11 +50,11 @@ please refer to the [Cookbook](//book.cakephp.org/4.0/en/plugins.html#loading-a-

Simply, you can execute the shell command to enable the plugin:
```bash
bin/cake plugin load DatabaseBackup
$ bin/cake plugin load DatabaseBackup
```
This would update your application's bootstrap method.

By default the plugin uses the `APP/backups` directory to save the backups
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:

```bash
Expand All @@ -51,50 +64,19 @@ $ mkdir backups/ && chmod 775 backups/
If you want to use a different directory, read the [Configuration](#configuration) section.

### 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.

#### For PHP 7.4 and CakePHP 4.0 later
Instead, the [cakephp4](//github.com/mirko-pagliai/cakephp-database-backup/tree/cakephp4) branch requires at least PHP
`>=7.4.0` and CakePHP `^4.0`.

In this case, you can install the package as well:
```bash
$ composer require --prefer-dist mirko-pagliai/cakephp-database-backup:dev-cakephp4
```
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):

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](//github.com/mirko-pagliai/cakephp-database-backup/releases/tag/2.12.3) version.
- 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 <7.4` and CakePHP `^3.5.1`.
This tag no longer receives any updates as of April 29, 2021, and roughly coincides with what `2.8.5` version was.

#### For CakePHP 3.0 and PHP 5.6 or later
Instead, the [cakephp3](//github.com/mirko-pagliai/cakephp-database-backup/tree/cakephp3) branch requires at least PHP
`>=5.6 <7.4` and CakePHP `^3.5.1`.

In this case, you can install the package as well:
```bash
$ 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](//github.com/mirko-pagliai/cakephp-database-backup/releases/tag/2.8.5) version.

## Requirements
*DatabaseBackup* requires:
* `mysql` and `mysqldump` for *MySql* databases;
* `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.

Please forward, remember that the database user must have the correct
permissions (for example, for `mysql` the user must have the `LOCK TABLES`
permission).
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
The plugin uses some configuration parameters. See our wiki:
Expand Down
Loading

0 comments on commit da50277

Please sign in to comment.