Download the PHP package phil/backup-bundle without Composer
On this page you can find all versions of the php package phil/backup-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phil/backup-bundle
More information about phil/backup-bundle
Files in phil/backup-bundle
Package backup-bundle
Short Description phil/backup in Symfony: database and media backups from configuration, encrypted and rotated, restored behind a confirmation guard, and tested by restoring.
License MIT
Homepage https://ph-il.ca
Informations about the package backup-bundle
phil/backup-bundle
Back a Symfony application's database and media files up from its configuration, restore them behind a guard, and test that they restore.
phil/backup-bundle puts phil/backup in a Symfony application. It reads the Doctrine DBAL connection to choose the
client — SQLite, MySQL, MariaDB or PostgreSQL — and to give it the credentials, which never reach a command line. It
backs the media directories up beside the database, encrypts every file with a key read from the environment, and
rotates the backups after each one. Three commands do the work: phil:backup:create, phil:backup:restore and
phil:backup:verify.
A restore is a decision taken twice. In production it is refused unless PHIL_BACKUP_ALLOW_PRODUCTION_RESTORE holds
the name of the database; everywhere it needs --confirm and the database's name typed again, asked for when the
console is interactive. The current content is then backed up, labelled before-restore, and the restore starts only
once that backup is written; the latest three of these are kept. Media files added since the backup are left, unless
--prune removes them. A key is required unless allow_unencrypted: true is set. phil:backup:verify restores a backup into a copy — a temporary file for SQLite, a
scratch database for a server — and checks it there, without touching the database.
It is for the developers and operators of a Symfony application who need backups they can trust and restores they cannot run by accident. It does not schedule the backups, copy them off the machine, or watch that they run: the application's scheduler, storage and monitoring do; see commands.md.
It is a Symfony bundle on phil/backup, the Console component, Doctrine DBAL and Symfony Process, and needs the
database's client tools where the commands run.
Status
| Area | State |
|---|---|
PhilBackupBundle: connection, directory, binaries, timeout, warn_after, grace_period, key, allow_unencrypted, media, rotation, restore, verify |
Implemented and tested |
DatabaseClients: the client of a DBAL connection, without connecting |
Implemented and tested |
ProcessCommandRunner: Symfony Process, no shell, a warning and an event for a slow tool, an optional time limit |
Implemented and tested |
phil:backup:create, phil:backup:restore, phil:backup:verify |
Implemented and tested on SQLite with the real sqlite3; MySQL, MariaDB and PostgreSQL by their command lines |
Documentation
- Installation — requirements, installing with Composer, registering the bundle, the client tools, a first key.
- Configuration — every key of
phil_backup, its default and effect, the services it wires, and each build-time error. - Commands — creating, restoring and testing a backup, their options and messages, scheduling, and copying a production database to work on.
- Restore protection — production, the confirmation, the name typed again, and the backup taken first.
- Extension points — the services you can rely on, another runner or client.
- Testing — how the bundle is tested, and how to test your configuration.
- API reference — every type of the bundle, with its role.
Quick start
Requirements
PHP 8.5 or later, phil/backup, doctrine/dbal 4.5, and symfony/config, symfony/console,
symfony/dependency-injection and symfony/process 8.2.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.
All versions of backup-bundle with dependencies
doctrine/dbal Version ^4.6
phil/backup Version ^0.1@dev
psr/clock Version ^1.0
psr/log Version ^3.0
symfony/config Version ^8.2
symfony/console Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/event-dispatcher-contracts Version ^3.8
symfony/lock Version ^8.2
symfony/process Version ^8.2