Weave Code
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 Restore Laravel Package

wnx/laravel-backup-restore

Restore database backups created by spatie/laravel-backup. Adds an interactive php artisan backup:restore command to pick a backup and optionally decrypt it, then run configurable post-restore health checks to validate the restored DB.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Disaster Recovery & Data Integrity: Enables automated, reliable database restoration from backups created by spatie/laravel-backup, reducing downtime and manual intervention during critical failures (e.g., corrupted databases, accidental deletions).
  • Build vs. Buy: Buy—avoids reinventing backup restoration logic while leveraging a battle-tested, Laravel-native solution. Aligns with existing spatie/laravel-backup infrastructure, minimizing integration effort.
  • Use Cases:
    • DevOps/Platform Teams: Automate backup validation (via GitHub Actions) to ensure backups are restorable before critical incidents.
    • Support Teams: Provide self-service restoration for non-technical users via CLI or custom UI wrappers (e.g., --no-interaction flag for cronjobs).
    • Multi-Environment Sync: Restore backups to staging/production environments with configurable health checks (e.g., verify critical data exists post-restore).
    • Compliance/Auditing: Extend health checks to validate regulatory requirements (e.g., "Does the restored DB contain all transactions from the last 7 days?").
  • Roadmap Enabler:
    • Feature Flag for "Time Travel": Integrate with feature flags to restore databases to a specific point in time (e.g., pre-deployment state).
    • Multi-Tenant Support: Future-proof by extending the package to handle tenant-isolated restores (though current limitation is noted).
    • Backup Analytics: Log restoration metrics (success/failure rates, duration) to identify backup quality issues.

When to Consider This Package

  • Adopt if:
    • Your team already uses spatie/laravel-backup (this package is a direct extension).
    • You need database-only restoration (files are excluded by design).
    • Your Laravel app runs on PHP 8.4+ and Laravel 12+ (hard dependency).
    • You require health checks to validate restore integrity (e.g., table existence, custom business logic).
    • You want to automate backup validation (e.g., via GitHub Actions or cronjobs).
    • Your database is not GTID-enabled (or you can configure spatie/laravel-backup to disable GTID during dumps).
  • Look Elsewhere if:
    • You need file restoration alongside databases (use spatie/laravel-backup directly or a custom script).
    • You’re on older Laravel/PHP versions (v11 or below, PHP 8.3 or below).
    • Your database uses GTID replication (workaround required; see Limitations).
    • You require multi-tenant isolation in restores (current limitation).
    • You need GUI-based restoration (consider building a UI wrapper or using Laravel Nova/Forge).
    • Your backups are encrypted with non-standard methods (this package relies on spatie/laravel-backup's encryption).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us automate and validate database restores—critical for reducing downtime during failures. By integrating with our existing spatie/laravel-backup setup, we can:

  • Cut recovery time from hours to minutes with CLI-driven restores.
  • Prevent silent backup failures by running automated health checks (e.g., ‘Does the restored DB have yesterday’s sales?’).
  • Enable self-service recovery for support teams, reducing ticket volume.
  • Add compliance safeguards with custom validation rules (e.g., ‘Restore only if GDPR data is intact’). It’s a low-risk, high-impact addition that leverages our existing infrastructure—no new tools or training needed."

For Engineering:

*"This is a drop-in solution for restoring spatie/laravel-backup databases with these key benefits:

  • Seamless Integration: Works with your existing config/backup.php and encryption setup.
  • Flexible CLI: Restore specific backups, reset databases, or automate via cron/GitHub Actions.
  • Extensible Health Checks: Add custom validation (e.g., model counts, data integrity) by extending HealthCheck.
  • Performance: Optimized for large databases (disables process timeouts during imports).
  • Safety Nets: Confirmation prompts and --no-interaction for scripting. Downsides: No file restoration (but we can layer this on top), and GTID databases need config tweaks. Worth the tradeoff for the reliability gains."*

For DevOps/SRE:

*"This solves two pain points:

  1. Backup Validation: The GitHub Actions workflow lets us test restores weekly—catching corrupt backups before they’re needed.
  2. Incident Response: Support teams can restore databases without manual SQL imports, using flags like --reset to wipe and repopulate. Example use case: If a dev accidentally drops the users table, they can run php artisan backup:restore --backup=latest --no-interaction and we’ve validated the restore works in staging first."*
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope