phpfy / laravel-backup
A comprehensive Laravel backup package with support for multiple databases and file backups
v1.0.0
2025-12-19 06:21 UTC
Requires
- php: ^8.1
- illuminate/console: ^9.0|^10.0|^11.0|^12.0
- illuminate/filesystem: ^9.0|^10.0|^11.0|^12.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
- league/flysystem: ^3.0
- symfony/process: ^6.0|^7.0
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0
README
A production-ready Laravel package for backing up your database and application files.
Works with MySQL, PostgreSQL, SQLite, and SQL Server using pure PHP database dumps, without requiring external CLI tools like mysqldump or pg_dump.
Designed for commercial and open-source projects.
✨ Features
- ✅ Database backups: MySQL, PostgreSQL, SQLite, SQL Server
- ✅ File backups with include & exclude paths
- ✅ No external dump tools required (pure PHP)
- ✅ AES-256 encryption support
- ✅ Multiple storage disks (local, S3, FTP, etc.)
- ✅ Automatic cleanup with retention rules
- ✅ Artisan commands for run, list & clean backups
- ✅ Scheduler-ready (Laravel Scheduler)
- ✅ Fully tested & PSR-compliant structure
📋 Requirements
- PHP 8.1 or higher
- Laravel 10.x or 11.x
- Required PDO extensions:
pdo_mysqlpdo_pgsqlpdo_sqlitepdo_sqlsrv
📦 Installation
composer require phpfy/laravel-backup
php artisan vendor:publish --provider="Phpfy\LaravelBackup\LaravelBackupServiceProvider" --tag=backup-config
⚙️ Configuration
Config file location:
config/backup.php
🚀 Usage
php artisan backup:run php artisan backup:list php artisan backup:clean
🧪 Testing
composer test
📄 License
MIT License.