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 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

A package to restore database backups made with spatie/laravel-backup.

Frequently asked questions about Laravel Backup Restore
How do I install `wnx/laravel-backup-restore` for Laravel 12?
Run `composer require wnx/laravel-backup-restore` to install the package. Ensure your Laravel app is on version 12+ and PHP 8.4+ for compatibility. Publish the config file with `php artisan vendor:publish --tag=backup-restore-config` if you need to customize health checks.
Can I restore backups created with other tools like custom scripts or AWS RDS?
No, this package only works with backups generated by `spatie/laravel-backup`. If you use other tools, you’ll need to migrate those backups to the spatie format or use a different restore solution.
What happens if my backup is corrupted during restore?
The package lacks built-in corruption detection, so a corrupted backup may fail silently or partially restore. Always verify backups before relying on them, and consider adding custom health checks to validate critical data post-restore.
How do I automate backups and restores in a CI/CD pipeline?
You can trigger restores via CLI in scripts, but the package requires interactive input for backup selection. For automation, pre-select backups by passing `--backup` and `--password` flags or use environment variables to streamline the process.
Does this package support PostgreSQL extensions or custom database functions?
No, the package restores raw database dumps and may fail if your schema includes PostgreSQL extensions, custom functions, or non-standard SQL. Test thoroughly in a staging environment before production use.
Can I restore backups stored in S3 or other cloud storage?
Yes, the package works with any storage backend supported by `spatie/laravel-backup`, including S3, FTP, or Dropbox. Ensure your Laravel app has the necessary credentials and permissions to access the storage during restore.
How do I add custom health checks to validate the restored database?
Extend the `HealthCheck` class and add your class path to the `health-checks` array in the published config file. The restore command will fail if any health check fails, ensuring data integrity.
What’s the best way to handle large database restores to avoid timeouts?
The package doesn’t optimize for large databases, so restores may time out or hit memory limits. Test with a subset of data first, and consider splitting large databases into smaller backups or using database-specific tools for chunked restores.
How do I roll back if a restore fails in production?
The package doesn’t include built-in rollback features. Plan for manual intervention, such as restoring from a previous backup or reverting application changes. Document your disaster recovery steps and test them regularly.
Are there alternatives to `wnx/laravel-backup-restore` for Laravel?
If you need more flexibility, consider `spatie/laravel-backup`’s direct restore methods or third-party tools like `laravel-backup` with custom scripts. For cloud-based solutions, AWS RDS snapshots or managed database backups may also fit your needs.
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.
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
anil/file-picker
broqit/fields-ai