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

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

myshell/laravel-db-backup
=========================

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

1.1.3(5y ago)05MITPHPPHP &gt;=5.4.0

Since Dec 14Pushed 5y agoCompare

[ Source](https://github.com/MyShellSoftwareLab/laravel-db-backup)[ Packagist](https://packagist.org/packages/myshell/laravel-db-backup)[ RSS](/packages/myshell-laravel-db-backup/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (10)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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

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

Recently: every ~153 days

Total

9

Last Release

2169d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3693483d8b80be41c5af8ed9bae297f4301ed5773ece7bfe1ab466019ab7d940?d=identicon)[MyShell](/maintainers/MyShell)

---

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)")[![GussRw](https://avatars.githubusercontent.com/u/9169125?v=4)](https://github.com/GussRw "GussRw (3 commits)")

### Embed Badge

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

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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