livijn / laravel-backup-downloader
Downloads the backups
Package info
github.com/Livijn/laravel-backup-downloader
pkg:composer/livijn/laravel-backup-downloader
Requires
- php: ^8.2|^8.4
- illuminate/support: ^9.0|^10.0|^11.0|^12.0|^13.0
- spatie/laravel-backup: ^7|^8|^9|^10
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0|^10.0|^11.0
- phpunit/phpunit: ^10.0|^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Downloads the backups from the laravel-backup
Installation
You can install the package via composer:
composer require livijn/laravel-backup-downloader
Usage
php artisan backup:download
php artisan backup:import
backup:download reuses the local SQL dump when the selected backup, SQL entry, and local file metadata are unchanged. Use php artisan backup:download --force to fetch it again. Only the requested SQL entry is extracted, and a failed download leaves the previous dump available while returning a failure exit code.
backup:import skips views inserts by default because that table is usually large and disposable in local imports.
Use --skip= to import every table, or --skip=views,telescope_entries to skip multiple tables.
To build eligible secondary indexes after loading the data:
php artisan backup:import --defer-indexes
This mode keeps PRIMARY, UNIQUE and foreign-key-supporting indexes during the load, then rebuilds the deferred indexes before completing. It preserves row data and leaves unsupported dump formats unchanged. SQL errors, including failed index rebuilds, stop the import before migrations run. It can be combined with --skip.
Downloads and SQL extraction show live progress with bytes transferred, speed and estimated time remaining. Both commands report elapsed time for their data processing phases.
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email ouff@live.se instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.