PHPackages                             olssonm/laravel-backup-shield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. olssonm/laravel-backup-shield

ActiveLibrary[Security](/categories/security)

olssonm/laravel-backup-shield
=============================

Protection for your laravel backups

v3.5(5y ago)3019.5k4MITPHPPHP ^7.3|^8.0CI failing

Since May 25Pushed 5y ago3 watchersCompare

[ Source](https://github.com/olssonm/laravel-backup-shield)[ Packagist](https://packagist.org/packages/olssonm/laravel-backup-shield)[ Docs](https://github.com/olssonm/laravel-backup-shield)[ RSS](/packages/olssonm-laravel-backup-shield/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (0)

Laravel Backup Shield
=====================

[](#laravel-backup-shield)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f38a1be26c1113b1309957224761c6b40c6dbad8709e5dfe8b4d7f863fca043c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6c73736f6e6d2f6c61726176656c2d6261636b75702d736869656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/olssonm/laravel-backup-shield)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/b00958b5823d2ea7bfdb960bb41600cb462eafe5f266e38e2ce553e8ebf5cb0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6f6c73736f6e6d2f6c61726176656c2d6261636b75702d736869656c642f52756e25323074657374732e7376673f7374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/olssonm/laravel-backup-shield/actions?query=workflow%3A%22Run+tests%22)[![Scrutinizer Score](https://camo.githubusercontent.com/839e3e1c47929880bb695f37e87f4ef73b5968ad3fb1e1d7bf880a50ccf37754/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f6c73736f6e6d2f6c61726176656c2d6261636b75702d736869656c642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/olssonm/laravel-backup-shield)

[![backup-shield](https://user-images.githubusercontent.com/907114/40585078-b42b31ba-61ac-11e8-9db6-b5497e156f5a.png)](https://user-images.githubusercontent.com/907114/40585078-b42b31ba-61ac-11e8-9db6-b5497e156f5a.png)

**⚠️ Password-protection/encryption can now be done natively in [spatie/laravel-backup](https://github.com/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!**

Secure your backups
-------------------

[](#secure-your-backups)

**This package helps you encrypt and password-protect your backups taken with [Spatie's](https://github.com/spatie) fantastic [spatie/laravel-backup](https://github.com/spatie/laravel-backup)-package.**

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.

*Using older versions of Laravel? Check out the [v1 branch](https://github.com/olssonm/laravel-backup-shield/tree/v1) (for Laravel 5.2) and the [v2 branch](https://github.com/olssonm/laravel-backup-shield/tree/v2).*

Requirements
------------

[](#requirements)

`php: ^7.3|^8.0`
`ext-zip: ^1.14`
`laravel: ^6|^7|^8`

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.

Installation
------------

[](#installation)

```
composer require olssonm/laravel-backup-shield
```

Configuration
-------------

[](#configuration)

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
];
```

#### Password

[](#password)

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

Set to `NULL` if you want to keep your backup without a password.

#### Encryption

[](#encryption)

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)

#### Regarding the layered archive

[](#regarding-the-layered-archive)

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.

Testing
-------

[](#testing)

```
$ composer test
```

or

```
$ phpunit
```

License
-------

[](#license)

The MIT License (MIT). Please see the [LICENSE.md](LICENSE.md) for more information.

© 2021 [Marcus Olsson](https://marcusolsson.me).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 96.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Recently: every ~115 days

Total

16

Last Release

1957d ago

Major Versions

v1.x-dev → v2.02018-05-26

v2.5 → v3.02019-09-13

PHP version history (6 changes)v1.0PHP ^7.0

v1.1PHP ~5.6|^7.0

v2.5PHP ~7.2

v3.0PHP &gt;=7.1

v3.3PHP ^7.2

v3.4PHP ^7.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/907114?v=4)[Marcus Olsson](/maintainers/olssonm)[@olssonm](https://github.com/olssonm)

---

Top Contributors

[![olssonm](https://avatars.githubusercontent.com/u/907114?v=4)](https://github.com/olssonm "olssonm (62 commits)")[![AlexGodbehere](https://avatars.githubusercontent.com/u/114239316?v=4)](https://github.com/AlexGodbehere "AlexGodbehere (1 commits)")[![donoskaro](https://avatars.githubusercontent.com/u/5261873?v=4)](https://github.com/donoskaro "donoskaro (1 commits)")

---

Tags

backuplaravel-5-packagelaravel-backupsecurityziplaravelsecuritybackuppasswordolssonm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/olssonm-laravel-backup-shield/health.svg)

```
[![Health](https://phpackages.com/badges/olssonm-laravel-backup-shield/health.svg)](https://phpackages.com/packages/olssonm-laravel-backup-shield)
```

###  Alternatives

[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

86110.6M23](/packages/spatie-laravel-csp)[jorijn/laravel-security-checker

Added Laravel functionality to the Enlightn Security Checker. Adds a command to check for, and optionally emails you, vulnerabilities when they affect you.

2031.9M1](/packages/jorijn-laravel-security-checker)[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

242661.0k1](/packages/tzsk-otp)[dgtlss/warden

A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email

9056.1k](/packages/dgtlss-warden)[mazedlx/laravel-feature-policy

Add Feature-Policy headers to the responses of a Laravel app

17191.4k](/packages/mazedlx-laravel-feature-policy)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

476.0k](/packages/nicobleiler-php-passphrase)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
