Download the PHP package raffaelecarelle/symfony-pro-backup-bundle without Composer
On this page you can find all versions of the php package raffaelecarelle/symfony-pro-backup-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download raffaelecarelle/symfony-pro-backup-bundle
More information about raffaelecarelle/symfony-pro-backup-bundle
Files in raffaelecarelle/symfony-pro-backup-bundle
Package symfony-pro-backup-bundle
Short Description Symfony bundle for database and filesystem backup/restore management
License MIT
Informations about the package symfony-pro-backup-bundle
Symfony Backup Bundle
A Symfony bundle for database and filesystem backup/restore management.
Overview
The Symfony Backup Bundle provides a complete and configurable system for automatic and manual backups of databases and filesystems, with optional Symfony Profiler integration for development.
Features
- Database backup and restore (MySQL, PostgreSQL, SQLite)
- Filesystem backup and restore
- Multiple storage adapters (Local, S3, Google Cloud)
- Compression support (gzip, zip)
- Retention policy helpers
- Scheduler/Messenger integration for automated backups (Symfony 7.3+)
- Event system for backup/restore operations
- Command-line interface and programmatic API
Requirements
- PHP: >= 8.2
- Symfony: 6.4+
Installation
Profiler
If you enabled profiler section import the profiler routing file:
Configuration
Create a configuration file at config/packages/pro_backup.yaml:
Usage
Console commands
Create a database backup:
Restore a backup:
List available backups:
Programmatic usage
Architecture
Database Adapter Auto-Detection
The bundle automatically detects the database type from your Doctrine DBAL connection configuration using a factory pattern. The DatabaseAdapterFactory inspects the database platform at runtime using Connection::getDatabasePlatform() and creates the appropriate adapter (MySQL, PostgreSQL, SQLite).
This approach is robust and works with:
- Modern DSN-based configuration (
postgresql://user:pass@host/db) - Legacy driver-based configuration (
pdo_pgsql,pdo_mysql) - Multiple database connections
- Any Doctrine-supported database platform
No manual adapter selection is required - the bundle automatically uses the correct backup tool (mysqldump, pg_dump, sqlite3) based on your connection type.
Supported Database Platforms
- MySQL/MariaDB: Uses
mysqldumpandmysqlfor backup/restore - PostgreSQL: Uses
pg_dumpandpg_restore/psqlfor backup/restore - SQLite: Uses file-based backup with
sqlite3CLI
Make sure the corresponding CLI tools are available in your system PATH.
Events
The bundle dispatches the following events (see ProBackupBundle\Event\BackupEvents):
backup.pre_backup: Before a backup operationbackup.post_backup: After a successful backup operationbackup.failed: When a backup operation failsbackup.pre_restore: Before a restore operationbackup.post_restore: After a successful restore operationbackup.restore_failed: When a restore operation fails
Development
- Run CS fixer (dry-run):
vendor/bin/php-cs-fixer fix --dry-run --diff - Run static analysis:
vendor/bin/phpstan analyse - Run tests:
vendor/bin/phpunit
CI runs on GitHub Actions with MySQL and PostgreSQL services and a matrix of PHP/Symfony versions compatible with this bundle.
License
This bundle is released under the MIT License.
All versions of symfony-pro-backup-bundle with dependencies
dragonmantank/cron-expression Version ^3.3
symfony/config Version ^6.4|^7.0|^8.0
symfony/console Version ^6.4|^7.0|^8.0
symfony/dependency-injection Version ^6.4|^7.0|^8.0
symfony/event-dispatcher Version ^6.4|^7.0|^8.0
symfony/framework-bundle Version ^6.4|^7.0|^8.0
symfony/http-foundation Version ^6.4|^7.0|^8.0
symfony/http-kernel Version ^6.4|^7.0|^8.0
symfony/messenger Version ^6.4|^7.0|^8.0
symfony/process Version ^6.4|^7.0|^8.0
symfony/scheduler Version ^6.4|^7.0|^8.0
symfony/serializer Version ^6.4|^7.0|^8.0
symfony/yaml Version ^6.4|^7.0|^8.0