spatie/laravel-backup
Create ZIP backups of your Laravel app: selected files plus database dumps. Store backups on any Laravel filesystem (including multiple destinations), monitor backup health, send notifications on failures, and automatically clean up old backups to save space.
Pros:
schedule() in app/Console/Kernel.php). Aligns with Laravel’s ecosystem (e.g., queues, notifications, and monitoring).config/backup.php, allowing granular control over backup sources (files/databases), destinations (local/S3/Cloud), and encryption. Supports multi-destination backups (e.g., local + S3).backup.created, backup.failed) for custom logic (e.g., Slack alerts, logging).Cons:
compression_level, temporary_directory).composer require spatie/laravel-backup).php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider").backup.php (sources, destinations, schedules).php artisan backup:run) or schedule (e.g., daily via schedule()).config/database.php.verify_backup: true, silent failures may go undetected. Mitigate by enabling verification or adding custom checks.cleanup config).temporary_directory on fast storage (e.g., SSD) to reduce I/O bottlenecks.node_modules, vendor, or custom logs?)php artisan backup:run).app/Console/Kernel.php):
$schedule->command('backup:run')->dailyAt('2:00');
'cleanup' => [
'mode' => Spatie\Backup\Tasks\Cleanup\Mode::OVERWRITE_OLDEST,
'retain_backups' => 7,
'retain_days' => 30,
],
compression_level, temporary_directory).config/filesystems.php (local, S3, GCS, etc.).spatie/db-dumper).backup:run --queue).config/database.php.backup.php (sources, destinations, encryption).php artisan backup:run) and verify:
app/Console/Kernel.php.config/backup.php, making it easy to update.backup.php must be version-controlledHow can I help you explore Laravel packages today?