spatie/laravel-backup
Spatie Laravel Backup creates zip backups of your app files and database, storing them on any Laravel filesystem (even multiple). Includes health monitoring, notifications, and automatic cleanup of old backups. Run with php artisan backup:run.
Pros:
BackupWasSuccessful, BackupHasFailed, CleanupWasSuccessful, etc.) for extensibility (e.g., triggering Slack alerts, logging, or custom workflows).Cons:
php artisan backup:run) or scheduled via Laravel’s task scheduler (e.g., schedule:run).BackupTask::create()), enabling asynchronous execution for long-running backups.BackupDestination.mysqldump, pg_dump, or mongodump for database backups. May need Docker or system-level setup in CI/CD or shared hosting..env) that should be excluded or encrypted?bootstrap/cache)?mysqldump/pg_dump/mongodump. For other databases (e.g., SQL Server, Oracle), custom dump scripts would be needed.ftp filesystem or custom drivers.laravel/slack-notification-channel).composer require spatie/laravel-backup
php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"
config/backup.php for pilot destinations (e.g., local + S3).php artisan backup:run --only-databases --destination=local
BackupTask::create('default')->run();
app/Console/Kernel.php):
$schedule->command('backup:run')->dailyAt('2:00');
'notifications' => [
'notifiable' => App\Notifications\BackupFailed::class,
'channels' => ['mail', 'slack'],
],
local, s3, ftp). Custom drivers must implement Illuminate\Contracts\Filesystem\Filesystem.mysqldump/pg_dump/mongodump are available (for database backups).config/backup.php.app/Console/Kernel.php.How can I help you explore Laravel packages today?