Protection for your laravel backups
⚠️ Password-protection/encryption can now be done natively in spatie/laravel-backup. If you use v6 or v7 of spatie/laravel-backup there is no longer a need to use this package. The development of this package has therefore been halted.
Thanks for using olssonm/laravel-backup-shield!
Backup Shield simply listens for when the .zip-file generated by Laravel-backup is done, grabs it and applies your password and encryption of your liking.
An appropriate zip-extension should be come with your PHP-install since PHP 7.2. If you for some reason don't have it installed – and don't want to install/upgrade it – look a versions prior to v3.4 of this package.
composer require olssonm/laravel-backup-shield
Publish your configuration using
php artisan vendor:publish and select
BackupShieldServiceProvider. Or directly via
php artisan vendor:publish --provider="Olssonm\BackupShield\BackupShieldServiceProvider".
You only have the ability to set two different options; password and encryption.
// Default configuration; backup-shield.php return [ 'password' => env('APP_KEY'), 'encryption' => \Olssonm\BackupShield\Encryption::ENCRYPTION_DEFAULT ];
Your password (duh). The default is the application key (
APP_KEY in your .env-file). You might want to set something more appropriate. Remember to use long strings and to keep your password safe – without it you will never be able to open your backup.
NULL if you want to keep your backup without a password.
Set your type of encryption. Available options are:
\Olssonm\BackupShield\Encryption::ENCRYPTION_DEFAULT (AES 128)
\Olssonm\BackupShield\Encryption::ENCRYPTION_WINZIP_AES_128 (AES 128)
\Olssonm\BackupShield\Encryption::ENCRYPTION_WINZIP_AES_192 (AES 192)
\Olssonm\BackupShield\Encryption::ENCRYPTION_WINZIP_AES_256 (AES 256)
This package adds the backup-zip created by spatie/laravel-backup inside a new password protected archive. This is to disable its contents to be able to be viewed without a password – instead only backup.zip will be displayed. Becouse, even without a password, a zip's contents (i.e. the file- and folder names) can be extracted.
$ composer test
The MIT License (MIT). Please see the LICENSE.md for more information.
© 2021 Marcus Olsson.