spatie/laravel-backup
Create a zip backup of your Laravel app's files and database, store it on any configured filesystem or multiple at once, monitor backup health, get notified when problems arise, and automatically clean up old backups. Run php artisan backup:run.
Bottom line: a low-risk, high-leverage adoption for any Laravel 12/13 estate that currently relies on ad-hoc dumps. It is not an infrastructure backup replacement — it is an application-aware backup layer (files + logical DB dump + health monitoring + retention) that closes the most common compliance gap at near-zero engineering cost. The 69.05 score and 40.24 opportunity score are consistent with a mature package in a solved problem space: the value is in cheap, standardised adoption, not in new capability.
Architecture fit
.env-adjacent config, storage/app user uploads, and portable zip artifacts that a non-DBA can restore.continue_on_failure) is the architecturally important feature: it enables the 3-2-1 pattern (local + object storage + cross-region/cross-account) with one config block, which is normally a bespoke script.Integration feasibility
composer require → php artisan vendor:publish → configure backup.php → schedule backup:run/backup:clean/backup:monitor. Estimate 0.5–1 day for a working non-prod pipeline, 1–2 weeks for production hardening (destinations, retention, notifications, restore rehearsal, runbooks).mysqldump/pg_dump) present in the runtime image, ZipArchive with AES support (requires libzip built with AES), writable temp disk sized to the archive, and queue workers if backups are dispatched as jobs.wnx/laravel-backup-restore or manual extraction. Any plan that does not budget restore work is buying a false sense of safety.Technical risk
composer.json — validate constraints directly before committing to a version. Teams on Laravel 10/11 must pin the v9 line, which is not receiving new features.EncryptBackupArchive. Any team that had self-registered that listener and suppressed encryption while keeping a configured password now produces unencrypted archives that look normal. This is exactly the class of defect that only surfaces in an audit or a breach — verify encryption on a produced artifact, don't trust config.verify_backup was effectively weak before 10.3.1 — it never compared file counts against the manifest, so truncated archives passed. Any prior proof-of-concept built on 10.0–10.3.0 has unvalidated verification. Re-baseline on ≥10.3.1.consoleOutput() with backupLogger(), redefined encryption config values, and changed CleanupStrategy's constructor. Custom listeners/notifications are the likely breakage surface — inventory them before any major bump..env on the app host.Key questions
--only-files) to avoid duplicated cost and a false "we back up the DB" narrative.backup:clean — destination credentials must be write-mostly, retention-protected, separate from the app's primary role.Stack fit
composer.json; README lags). Destinations via any configured Flysystem disk — S3, GCS, Azure Blob, SFTP. Scheduling in routes/console.php (Laravel 11+ style) or the legacy Kernel. Notifications through Laravel's notification system: mail, Slack, Discord, generic webhook (new in v10) — route to the existing on-call channel rather than inventing a new one.backup.backup.password and destination credentials from the platform secret manager, injected as env at boot. Never committed, never only on the app host.log_channel (10.1.0) should be pointed at the security/ops channel so backup activity is auditable separately from app noise.Migration path
mysqldump scripts: run both in parallel for one full retention cycle, diff the artifact inventories (file counts, DB row-count spot checks) before decommissioning the scripts. Overlap is cheap; a gap in coverage is not.composer remove + re-enable the prior scripts — genuinely reversible.Compatibility
^10.3 with a committed lockfile; block major upgrades behind a PR review because breaking changes land in majors (v10 touched events, logging, encryption config, cleanup strategy).mysqldump/pg_dump and an AES-capable libzip — add a build-time assertion so the pipeline fails fast rather than at 2am.Sequencing
verify_backup on ≥10.3.1; assert AES availability.backup:run, backup:clean (offset by hours), and backup:monitor; wire notifications to on-call.Maintenance
EncryptBackupArchive is the template for how a listener removal can change security posture without a visible error.Support
Scaling
--filename/--destination-path (new in v10) to avoid collisions in cleanup logic.--only-files where DB snapshots already exist. Multi-tenant estates should consider per-tenant runs only if contractual isolation demands it — otherwise it multiplies cost for little gain.Failure modes
backup:monitor on an independent schedule plus a dead-man's-switch expectation on the notification channel; the monitor is the control, the backup is not.verify_backup on ≥10.3.1, but only if enabled and only if the restore drill exists.BackupFailed, correct behaviour. Requires the runtime-image assertion noted above to avoid discovering it in production.continue_on_failure means one destination can be stale while the command exits "successfully". Alert on per-destination status, not on exit code alone.Ramp-up
How can I help you explore Laravel packages today?