PHPackages                             salvatorecervone/backup-database - 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. salvatorecervone/backup-database

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

salvatorecervone/backup-database
================================

This package manage backup-database

2.0.7(4mo ago)188[2 issues](https://github.com/SalvatoreCervone/backup-database/issues)[2 PRs](https://github.com/SalvatoreCervone/backup-database/pulls)MITPHPPHP ^8.3CI failing

Since Apr 8Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/SalvatoreCervone/backup-database)[ Packagist](https://packagist.org/packages/salvatorecervone/backup-database)[ Docs](https://github.com/SalvatoreCervone/backup-database)[ GitHub Sponsors](https://github.com/SalvatoreCervone)[ RSS](/packages/salvatorecervone-backup-database/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (8)Versions (23)Used By (0)

LARAVEL BACKUP-DATABASE
=======================

[](#laravel-backup-database)

[![laravel backup database](https://github.com/SalvatoreCervone/backup-database/raw/main/images/backup-database.jpeg)](https://github.com/SalvatoreCervone/backup-database/blob/main/images/backup-database.jpeg)

BETA FOR BACKUP DATABASE
------------------------

[](#beta-for-backup-database)

Important

Actually V1 used for only backup MSSQL Database with Driver Sqlsrv

- MSSQL
- MySQL
- MongoDB

1 or more Database
------------------

[](#1-or-more-database)

You can backup one or more database in single operation. In config file you add connection name of you single or multi database and send backup. Example of single:

```
 'listconnections' => [
        [
            'connection' => env('DB_CONNECTION'),
            'daily' => false,
            'datetimeFormat' => 'Y-m-d H:i',
            'destinationpath' => 'c:\tmp\\',
            'days_for_delete' => 1,
            'soft_delete' => false
        ]
    ],

```

The backup config, for default, read DB\_CONNECTION of your env file. From you connection name read any other paramters for execute backup If, example, user in env file not have permission for backup db you setting manually user and password in config file. example:

```
 'listconnections' => [
        [
            'connection' => env('DB_CONNECTION'),
            'db_name' => 'db_name',
            'db_host' => 'db_host',
            'db_username' => 'user',
            'db_password' => 'password123',
            'daily' => false,
            'datetimeFormat' => 'Y-m-d H:i',
            'destinationpath' => 'c:\tmp\\',
            'days_for_delete' => 1,
            'soft_delete' => false
        ]
    ],

```

Delete
------

[](#delete)

You can set, in config file, days\_for\_delete parameter. In this Parameter you set the days for delete previus databases. If you set days\_for\_delete = null delete is disabled. If you set days\_for\_delete = 0 you delete all previus databases.

Another parameters in config file is: soft\_delete if you set this parameter to true you previus databases not would deleted but moved in folder called trash created in destinationpath

exemple:

```
//  config/backup-database.php
[
    'connection' => env('DB_CONNECTION'),
    'db_name' => 'db_name',
    'db_host' => 'db_host',
    'db_username' => 'user',
    'db_password' => 'password123',
    'daily' => false,
    'datetimeFormat' => 'Y-m-d H:i',
    'destinationpath' => 'c:\tmp\\',
    'days_for_delete' => 1,
    'soft_delete' => false
]

```

in this case trash folder would created in c:\\tmp -&gt; c:\\tmp\\trash

For install:
------------

[](#for-install)

```
composer require salvatorecervone/backup-database

```

For publish config
------------------

[](#for-publish-config)

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

```

For test use
------------

[](#for-test-use)

```
php artisan tink

```

after

```
BackupDatabase::backup();

```

This return result in terminal and create backup in config.destinationpath

View
----

[](#view)

In the blade view

```
http://127.0.0.1:8000/backups

```

you have a list of your backup of your driver connection.

In this view you have information of backup and : one button for delete a single backup one button for lunch all backups

Artisan command
---------------

[](#artisan-command)

You find a command artisan for lunch backup for CLI or insert in schedulate

```
php artisan backup-database:backup

```

Schedule
--------

[](#schedule)

If you schedule this, for example, every day you can use default laravel schedulate

```
App\Console\Kernel.php

 protected function schedule(Schedule $schedule)    {
    $schedule->command('backup-database:backup')->dailyAt('3:00')
}

```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance56

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% 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 ~17 days

Recently: every ~66 days

Total

19

Last Release

134d ago

Major Versions

1.91 → 2.0.12025-04-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40053308?v=4)[SalvatoreCervone](/maintainers/SalvatoreCervone)[@SalvatoreCervone](https://github.com/SalvatoreCervone)

---

Top Contributors

[![SalvatoreCervone](https://avatars.githubusercontent.com/u/40053308?v=4)](https://github.com/SalvatoreCervone "SalvatoreCervone (80 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelmssqlsql serverSalvatoreCervonebackup-database

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/salvatorecervone-backup-database/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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