{"id":15450512,"url":"https://github.com/mirko-pagliai/cakephp-database-backup","last_synced_at":"2026-04-20T08:04:20.909Z","repository":{"id":22096098,"uuid":"95145744","full_name":"mirko-pagliai/cakephp-database-backup","owner":"mirko-pagliai","description":"DatabaseBackup is a CakePHP plugin to export, import and manage database backups","archived":false,"fork":false,"pushed_at":"2026-02-01T08:24:19.000Z","size":1850,"stargazers_count":24,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"3.0.x","last_synced_at":"2026-03-09T16:59:34.467Z","etag":null,"topics":["backup","backup-script","backup-tool","backup-utility","cakephp","cakephp-plugin","database-backup","mysql","php","postgresql","sqlite"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirko-pagliai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-22T18:38:58.000Z","updated_at":"2026-02-25T01:26:42.000Z","dependencies_parsed_at":"2023-02-19T10:01:13.145Z","dependency_job_id":"4d69d213-fe52-4f2b-9035-674e46265291","html_url":"https://github.com/mirko-pagliai/cakephp-database-backup","commit_stats":{"total_commits":888,"total_committers":4,"mean_commits":222.0,"dds":"0.011261261261261257","last_synced_commit":"52918f2426e82426911d08d68e7add732228765e"},"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/mirko-pagliai/cakephp-database-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirko-pagliai%2Fcakephp-database-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirko-pagliai%2Fcakephp-database-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirko-pagliai%2Fcakephp-database-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirko-pagliai%2Fcakephp-database-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirko-pagliai","download_url":"https://codeload.github.com/mirko-pagliai/cakephp-database-backup/tar.gz/refs/heads/3.0.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirko-pagliai%2Fcakephp-database-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32038456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","backup-script","backup-tool","backup-utility","cakephp","cakephp-plugin","database-backup","mysql","php","postgresql","sqlite"],"created_at":"2024-10-01T21:05:54.076Z","updated_at":"2026-04-20T08:04:20.902Z","avatar_url":"https://github.com/mirko-pagliai.png","language":"PHP","funding_links":[],"categories":["Miscellaneous","Plugins"],"sub_categories":["Miscellaneous"],"readme":"# cakephp-database-backup\n\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.txt)\n[![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)\n[![codecov](https://codecov.io/gh/mirko-pagliai/cakephp-database-backup/branch/3.0.x/graph/badge.svg?token=nkaJk4nvus)](https://codecov.io/gh/mirko-pagliai/cakephp-database-backup)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cd12284c1047431c8149e09fa56536bf)](https://app.codacy.com/gh/mirko-pagliai/cakephp-database-backup/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![CodeFactor](https://www.codefactor.io/repository/github/mirko-pagliai/cakephp-database-backup/badge)](https://www.codefactor.io/repository/github/mirko-pagliai/cakephp-database-backup)\n\n*DatabaseBackup* is a CakePHP plugin to export, import and manage database backups.\nCurrently, the plugin supports *MySql*, *Postgres* and *Sqlite* databases.\n\nDid you like this plugin? Its development requires a lot of time for me.\nPlease consider the possibility of making [a donation](//paypal.me/mirkopagliai):\neven a coffee is enough! Thank you.\n\n[![Make a donation](https://www.paypalobjects.com/webstatic/mktg/logo-center/logo_paypal_carte.jpg)](//paypal.me/mirkopagliai)\n\n## Requirements\n\n*DatabaseBackup* requires:\n\n*   `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));\n*   `pg_dump` and `pg_restore` for *Postgres* databases;\n*   `sqlite3` for *Sqlite* databases.\n\n**Optionally**, if you want to handle compressed backups, `bzip2` and `gzip` are\nalso required.\n\nThe installation of these binaries may vary depending on your operating system.\n\n## Installation\n\nYou can install the plugin via composer:\n\n```bash\ncomposer require --prefer-dist mirko-pagliai/cakephp-database-backup\n```\n\nThen you have to load the plugin. For more information on how to load the plugin,\nplease refer to the [CakePHP documentation](https://book.cakephp.org/5/en/plugins.html#loading-a-plugin).\n\nYou can execute the shell command to enable the plugin:\n```bash\nbin/cake plugin load DatabaseBackup\n```\nThis would update your application's bootstrap method.\n\n### Installation on older CakePHP and PHP versions\n\nCompared to the current installation requirements, some tags or branches are provided for those using older versions of\nCakePHP and PHP:\n\n- `2.15` versions, which require at least CakePHP `5.0` and PHP `8.1`;\n- tag [`cakephp4`](https://github.com/mirko-pagliai/cakephp-database-backup/releases/tag/cakephp4), which requires at\n  least PHP `\u003e=7.4.0` and CakePHP `^4.0`.   \n  This tag no longer receives any updates as of January 5, 2024, and roughly coincides with what `2.12.3` version was.\n- tag [`cakephp3`](https://github.com/mirko-pagliai/cakephp-database-backup/releases/tag/cakephp3), which requires at\n  least PHP `\u003e=5.6 \u003c7.4` and CakePHP `^3.5.1`.   \n  This tag no longer receives any updates as of April 29, 2021, and roughly coincides with what `2.8.5` version was.\n\nYou can freely use these, even by downloading the source codes from the attached assets, but their functioning is\nno longer guaranteed, especially regarding old dependencies that may no longer be available.\n\n## Configuration and How to use\n\nSee [our documentation](/docs).\n\nBefore opening an issue, check this list of [common issues](docs/Common%20issues.md).\n\n## Testing\n\nUnlike previous versions, with the 3.x branch, thanks to the _Mockery_'s overloading and the (external) component\n`Process` that actually takes care of executing the commands to export/import the databases, normally the tests do not\nreally use the database drivers and do not write or read files on the filesystem (i.e., everything is simulated).\n\nThe only exception is given by the class `DatabaseBackup\\Test\\TestCase\\Utility\\BackupExportAndImportTest`, which however\ndoes not belong to the testsuite executed by default (it is therefore an optional test) and is marked with the attribute\n`#[CoversNothing]`.\n\nThis test class, when executed, will test a real database export and import, using the `pdo_mysql`, `pdo_pgsql` and\n`pdo_sqlite` PHP extensions, that is all the drivers and databases supported by the plugin.\n\nYou can test the class directly or the configured `real-drivers` testsuite ([see available testsuites](phpunit.xml.dist)):\n```bash\nvendor/bin/phpunit --testsuite=real-drivers\n```\n\n[Continuous integration (CI) workflows](https://github.com/mirko-pagliai/cakephp-database-backup/actions/workflows/ci.yml) must be run with `highest`/`lowest` dependencies and \"without\"/\"only with\"\nreal drivers and databases.\n\n### Running tests with real database drivers (_Docker_)\nSome tests require real database drivers and system binaries (e.g. `mysqldump`, `pg_dump`, `pg_restore`) and therefore\ndepend on the local environment configuration.\n\nHowever, running these tests reliably requires properly configured database servers and matching system binaries.\n\nFor this reason, _Docker_ can be used to provide a predefined and controlled environment in which real-drivers tests can\nbe executed consistently.\n\n#### Running real-drivers tests using Docker\n\nFrom the project root:\n\n```bash\ndocker compose -f docker/docker-compose.yml down -v\ndocker compose -f docker/docker-compose.yml build\ndocker compose -f docker/docker-compose.yml up -d\ndocker compose -f docker/docker-compose.yml exec php vendor/bin/phpunit --testsuite=real-drivers\n```\n\nThis setup runs the real-drivers test suite against real MySQL/MariaDB and PostgreSQL servers, using their corresponding\ndump/restore binaries, in a controlled environment.\n\n## Versioning\n\nFor transparency and insight into our release cycle and to maintain backward\ncompatibility, *DatabaseBackup* will be maintained under the\n[Semantic Versioning guidelines](http://semver.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirko-pagliai%2Fcakephp-database-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirko-pagliai%2Fcakephp-database-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirko-pagliai%2Fcakephp-database-backup/lists"}