PHPackages                             wladmonax/laravel-db-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. [Database &amp; ORM](/categories/database)
4. /
5. wladmonax/laravel-db-backup

ActiveLibrary[Database &amp; ORM](/categories/database)

wladmonax/laravel-db-backup
===========================

Backup and restore databases. Encrypting dumps. Save dumps to db and uploading to Dropbox. Restore dump from Dropbox.

1.1.1(7y ago)26.5k↓37.5%3MITPHPPHP &gt;=5.4.0

Since Dec 14Pushed 7y agoCompare

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

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

laravel-db-backup
=================

[](#laravel-db-backup)

Based off of  with support for Laravel 5.\*.

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

[](#installation)

Run composer command :

```
composer require wladmonax/laravel-db-backup
```

Or

Update your `composer.json` file to include this package as a dependency

```
"wladmonax/laravel-db-backup": "1.1.*",
```

Register the service provider by adding it to the providers array in the `config/app.php` file.

```
'providers' => array(
    'Witty\LaravelDbBackup\DBBackupServiceProvider'
)
```

or

```
'providers' => array(
    Witty\LaravelDbBackup\DBBackupServiceProvider::class
)
```

Run command to creating tables:

```
$ php artisan migrate
```

Configuration
=============

[](#configuration)

Copy the config file into your project by running

```
php artisan vendor:publish

```

This will generate a config file like this

```
return [

    // add a backup folder in the app/database/ or your dump folder
    'path' => app_path() . '/database/backup/',

    // add the path to the restore and backup command of mysql
    // this exemple is if your are using MAMP server on a mac
    // on windows: 'C:\\...\\mysql\\bin\\'
    // on linux: '/usr/bin/'
    // trailing slash is required
    'mysql' => [
        'dump_command_path' => '/Applications/MAMP/Library/bin/',
        'restore_command_path' => '/Applications/MAMP/Library/bin/',
    ],

    // s3 settings
    's3' => [
        'path'  => 'your/s3/dump/folder'
    ]

    //dropbox settings
    'dropbox' => [
        'accessToken' => DROPBOX_ACCESS_TOKEN,
        'appSecret' => DROPBOX_APP_SECRET,
        'prefix' => DROPBOX_PREFIX, //this is name of your dropbox folder
    ],

    //encrypt settings
    'encrypt' => [
        'key' => ENCRYPT_KEY
    ],
    // Use GZIP compression
    'compress' => false,
];
```

**All settings are optional and have reasonable default values.**

Usage
-----

[](#usage)

#### Backup

[](#backup)

Creates a dump file in `app/storage/dumps`

```
$ php artisan db:backup
```

###### Use specific database

[](#use-specific-database)

```
$ php artisan db:backup --database=mysql
```

###### Need ecnrypt db

[](#need-ecnrypt-db)

```
$ php artisan db:backup --encrypt
```

###### Save dump to dropbox

[](#save-dump-to-dropbox)

```
$ php artisan db:backup --dropbox
```

###### You can merge options like this

[](#you-can-merge-options-like-this)

```
$ php artisan db:backup --dropbox --encrypt
```

###### Upload to AWS S3

[](#upload-to-aws-s3)

```
$ php artisan db:backup --upload-s3 your-bucket
```

You can use the `--keep-only-s3` option if you don't want to keep a local copy of the SQL dump.

Uses the [aws/aws-sdk-php-laravel](https://github.com/aws/aws-sdk-php-laravel) package which needs to be [configured](https://github.com/aws/aws-sdk-php-laravel#configuration).
Uses the [spatie/flysystem-dropbox](https://github.com/spatie/flysystem-dropbox) package.

#### Restore

[](#restore)

Paths are relative to the app/storage/dumps folder.

###### Restore a dump

[](#restore-a-dump)

```
$ php artisan db:restore dump.sql
```

###### Restore from last backup dump

[](#restore-from-last-backup-dump)

```
$ php artisan db:restore --last-dump
```

###### Restore from Dropbox

[](#restore-from-dropbox)

```
$ php artisan db:restore --dropbox-dump=filename.sql
```

###### Restore from Dropbox last dump

[](#restore-from-dropbox-last-dump)

```
$ php artisan db:restore --dropbox-last-dump
```

###### List dumps

[](#list-dumps)

```
$ php artisan db:restore
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~133 days

Recently: every ~95 days

Total

7

Last Release

2638d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/427eb5cf90ed10de1dc48b853bef49b93f6f9a056398677901e888ccc6347ebf?d=identicon)[Vladyslav Ternal](/maintainers/Vladyslav%20Ternal)

---

Top Contributors

[![Levgenij](https://avatars.githubusercontent.com/u/16118509?v=4)](https://github.com/Levgenij "Levgenij (8 commits)")[![wladmonax](https://avatars.githubusercontent.com/u/36949716?v=4)](https://github.com/wladmonax "wladmonax (8 commits)")[![larkinwhitaker](https://avatars.githubusercontent.com/u/9460109?v=4)](https://github.com/larkinwhitaker "larkinwhitaker (6 commits)")

### Embed Badge

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

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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