Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Backup Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

Build vs. buy on a non-differentiating capability. Backup is table stakes, not a competitive advantage. This package compresses what would be a multi-sprint build (zip archive assembly, DB dumping per driver, retention, notifications, health checks) into roughly a day of configuration. Approving it is a "buy" decision with zero licensing cost and no vendor lock-in — MIT, self-hosted, plain Laravel filesystem abstraction.

Whether we can commit to a disaster-recovery promise. This is the package's real strategic value: it turns an implicit "the DB provider backs things up" assumption into an explicit, auditable, application-level control. That directly supports sales conversations around SOC 2 / ISO 27001 readiness, enterprise security questionnaires, and any customer asking "what happens to our data if your app corrupts it?"

Roadmap prioritization for reliability work. The included monitor (php artisan backup:monitor), multi-channel notifications (including a generic webhook channel added in v10), and log_channel config mean "we don't know if backups are actually running" becomes a solved problem rather than an open epic. It lets us schedule reliability work without funding a reliability team.

Feature-level decisions it unblocks or constrains:

  • Multi-destination resilience — continue_on_failure and per-destination writes let us promise "backed up to S3 and off-site" as a plan-tier or compliance feature rather than a single point of failure.
  • Encryption posture — v10 encrypts archives during the build (AES-128/192/256) rather than rewriting them afterward, so backup windows for large tenants don't double. Enables us to state "backups are encrypted at rest with a key we control" in the trust page.
  • Retention economics — backup:clean with configurable cleanup strategies makes storage cost a tunable, which matters at scale and on per-tenant plans.
  • Restore as a separate decision — the package deliberately does not ship automated restore (docs point to wnx/laravel-backup-restore). A backup feature whose restore path is unowned is an incident waiting to happen; budget restoration as a distinct workstream, not a checkbox.

Use cases worth writing down: pre-deploy/pre-migration snapshots, tenant-level exports and GDPR data portability requests, staging refreshes (with PII masking), and "customer deleted their data" recovery.

When to Consider This Package

Adopt when:

  • The app is Laravel 12+ on PHP 8.4+ (v10 baseline; note v10.2.0 walked the PHP floor back to 8.3, but Laravel 12 remains the requirement). Apps pinned to older stacks must use v8/v9 — supported for bugs, not features — which is a real constraint worth confirming before it lands in a roadmap.
  • Backups are genuinely application-scoped: the concern is app files (uploads, generated documents) plus a logical DB dump, not infrastructure volumes.
  • The team is small and would rather own a config file than a cron-plus-shell-script-plus-S3-lifecycle pipeline.
  • We want the retention/notification/monitoring triad without procuring a vendor.

Look elsewhere when:

  • The primary data store is managed (RDS, Cloud SQL, Aurora) and automated snapshots plus point-in-time recovery already cover the RPO/RTO we've committed to. This package produces logical dumps — it does not give you PITR and should not be sold internally as a substitute.
  • Data volume is large. Building a zip on the app host means CPU, memory, and transient disk on the same box serving traffic. Above roughly tens of GB, push to a dedicated backup service or snapshot-based approach.
  • The architecture is multi-service. This backs up one Laravel app; it doesn't cover queues, search indices, object-storage buckets, or third-party SaaS state. A partial backup story presented as a full one is worse than an honest gap.
  • Compliance requires a vendor with a contract, SLA, and audit reports. MIT open source is a strength for lock-in and a weakness for procurement — know which conversation you're in.
  • Restore automation and verification drills are a hard requirement out of the box. Here, verification is in scope (verify_backup compares archive file counts against the manifest to catch truncation) but restoration is not.

Maturity signal: ~6k stars, documented, versioned changelog, active releases, and a maintainer (Spatie) with a long track record. The changelog reads like a healthy project — v10 shipped verification, resilient multi-destination, webhook notifications, and --config runtime overrides. That's a package still investing, not coasting.

How to Pitch It (Stakeholders)

To executives — one paragraph: We have a gap in our data-protection story that customers and auditors will find: no application-level backup of our database and file storage, and no evidence that any backup would work. This package closes it at effectively zero license cost, in days rather than a quarter, and gives us scheduled backups to multiple locations, encryption at rest, automatic retention cleanup, and alerting when a backup fails. It's the cheapest credible way to answer the security questionnaire question we currently answer with a shrug. The residual work is ours: key management and a restore drill.

To engineering — the substance: It's spatie/laravel-backup, MIT, battle-tested, ~6k stars, actively maintained, and it fits our existing stack — Laravel filesystem disks for destinations, Laravel's scheduler for cadence, Laravel notifications for alerting. Integration is config plus three scheduled commands (backup:run, backup:clean, backup:monitor). It handles the tedious parts we'd otherwise hand-roll and get subtly wrong: per-driver database dumps, zip assembly, retention strategies, health checks, and failure reporting. v10 made archives encrypted as they're built rather than rewritten, so we don't pay double I/O on large backups, and it added continue_on_failure so one dead destination doesn't void the whole run.

What we're explicitly signing up for:

  • Restore is not included. We own the restore runbook. Plan a quarterly restore drill into a non-production environment — an untested backup is a hypothesis, not a control.
  • Key management is ours. If we enable encryption, the password lives in our secrets manager and losing it makes every archive unreadable. Decide now who holds it and what the rotation story is.
  • Host resources are ours. Archive building happens on the app server; monitor memory and transient disk, and scope the included directories deliberately (storage/framework is excluded by default, which is right).
  • Version policy. We're adopting a young major line. Pin the version, watch the changelog, and treat PHP/Laravel upgrades as coupled to backup-package upgrades.
  • The honest limits. This is app-level backup, not point-in-time recovery and not a full-architecture data-protection plan. Position it internally as the application layer of that plan, alongside whatever the managed database and object storage already provide.

The ask: approve the dependency and roughly one sprint of integration, configuration, notification wiring, and the first restore drill. Success criteria: a scheduled backup lands in two separate destinations, an intentional failure triggers an alert within one cycle, and a documented restore completes from the newest archive inside the window we've promised customers.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode