PHPackages                             jrosasr/laravel-backup - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. jrosasr/laravel-backup

ActiveLibrary[File &amp; Storage](/categories/file-storage)

jrosasr/laravel-backup
======================

Realiza copias de seguridad de la base de datos de tu aplicación Laravel de una forma simple y eficiente.

1.0.0(9mo ago)32MITPHPPHP ^8.2

Since Jul 18Pushed 9mo agoCompare

[ Source](https://github.com/jrosasr/laravel-backup)[ Packagist](https://packagist.org/packages/jrosasr/laravel-backup)[ Docs](https://github.com/jrosasr/laravel-backup)[ RSS](/packages/jrosasr-laravel-backup/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

jrosasr/laravel-backup
======================

[](#jrosasrlaravel-backup)

Laravel package to automate and simplify database backup creation, with local or cloud storage. Ideal for developers and administrators seeking a robust and flexible solution, compatible with Docker environments.

---

Table of Contents
-----------------

[](#table-of-contents)

- [jrosasr/laravel-backup](#jrosasrlaravel-backup)
    - [Table of Contents](#table-of-contents)
    - [Main Features](#main-features)
    - [Compatibility](#compatibility)
        - [Supported Databases](#supported-databases)
        - [Supported Storage Services](#supported-storage-services)
    - [Supported Laravel Versions](#supported-laravel-versions)
    - [Installation](#installation)
    - [Configuration](#configuration)
    - [Commands](#commands)
        - [1. Generate a database backup](#1-generate-a-database-backup)
        - [2. Store an existing backup in the configured storage](#2-store-an-existing-backup-in-the-configured-storage)
    - [Support](#support)
    - [License](#license)

---

Main Features
-------------

[](#main-features)

- **Database Backup:** Full backups of your database.
- **Docker Support:** Runs `pg_dump` inside a Docker container if your database is dockerized.
- **Flexible Storage:**
    - **Local:** Stores backups on the server's filesystem.
    - **Backblaze B2:** Uploads backups to a Backblaze B2 bucket.
- **Configurable:** Easily choose the storage driver (`local` or `b2`).

---

Compatibility
-------------

[](#compatibility)

### Supported Databases

[](#supported-databases)

DatabaseSupportedPostgreSQL✅MySQL❌MongoDB❌SQLite❌### Supported Storage Services

[](#supported-storage-services)

ServiceSupportedBackblaze B2✅AWS S3❌Google Cloud Storage❌Azure Blob Storage❌---

Supported Laravel Versions
--------------------------

[](#supported-laravel-versions)

Laravel VersionSupported10.x✅11.x✅12.x✅---

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

[](#installation)

Install the package via Composer:

```
composer require jrosasr/laravel-backup
```

---

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

[](#configuration)

1. Publish the configuration file:

    ```
    php artisan vendor:publish --tag=backup-config
    ```

    This will copy the `backup.php` file to your `config/` directory.
2. In your `.env` file, set the storage driver:

    ```
    BACKUP_DRIVER=local # or BACKUP_DRIVER=b2
    ```
3. If you use Backblaze B2, set the credentials in `.env`:

    ```
    B2_ENDPOINT="https://s3.us-west-004.backblazeb2.com"    # Replace with your B2 endpoint
    B2_APPLICATION_KEY_ID="your_b2_application_key_id"
    B2_APPLICATION_KEY="your_b2_application_key"
    B2_REGION="us-west-004"
    B2_BUCKET_NAME="your_b2_bucket_name"
    DB_DOCKER_CONTAINER_NAME="your_docker_container_name"   # Optional, if your DB is in Docker
    ```
4. Example configuration in `config/filesystems.php`:

    ```
    'b2' => [
        'driver' => 's3',
        'endpoint' => env('B2_ENDPOINT'),
        'key' => env('B2_APPLICATION_KEY_ID'),
        'secret' => env('B2_APPLICATION_KEY'),
        'region' => env('B2_REGION'),
        'bucket' => env('B2_BUCKET_NAME'),
        'throw' => false,
        'docker_container_name' => env('DB_DOCKER_CONTAINER_NAME')
    ],
    'local' => [
        'driver' => 'local',
        'root' => storage_path('app/private'),
        'serve' => true,
        'throw' => false,
        'report' => false,
    ],
    ```

---

Commands
--------

[](#commands)

The package provides the following Artisan commands to manage your backups:

### 1. Generate a database backup

[](#1-generate-a-database-backup)

```
php artisan lbackup:db
```

Generates a database backup file in the `storage/app/private/backups` path and, depending on the configured driver (`local` or `b2`), stores or uploads it automatically.

### 2. Store an existing backup in the configured storage

[](#2-store-an-existing-backup-in-the-configured-storage)

```
php artisan lbackup:storage
```

Creates a `zip` file with the files located in `storage/private` and `storage/public`, and takes the existing backup file (e.g., `backup_2025_01_01.zip`) to store it in the configured driver (`local` or `b2`).

---

Support
-------

[](#support)

Have questions, suggestions, or found a bug? Open an issue in the repository.

---

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance55

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57bfcd27572ec2e131a58959a44a5b68a8355fcf50de0560f1e419864d230b4d?d=identicon)[jrosasr](/maintainers/jrosasr)

---

Top Contributors

[![jrosasr](https://avatars.githubusercontent.com/u/107132051?v=4)](https://github.com/jrosasr "jrosasr (7 commits)")

---

Tags

laravelbackup

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[zanysoft/laravel-zip

laravel-zip is the world's leading zip utility for file compression and backup.

3142.8M15](/packages/zanysoft-laravel-zip)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[bringyourownideas/laravel-backblaze

Backblaze B2 Cloud Storage for Laravel 5. Original by Paul Olthof (@hpolthof) continued by @bringyourownideas

1237.8k](/packages/bringyourownideas-laravel-backblaze)

PHPackages © 2026

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