PHPackages                             sulaimanbarki/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. sulaimanbarki/laravel-db-backup

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

sulaimanbarki/laravel-db-backup
===============================

A lightweight database backup download route package for Laravel.

v1.0.2(2mo ago)09MITPHPPHP ^8.0

Since May 18Pushed 2mo agoCompare

[ Source](https://github.com/sulaimanbarki/laravel-db-backup)[ Packagist](https://packagist.org/packages/sulaimanbarki/laravel-db-backup)[ RSS](/packages/sulaimanbarki-laravel-db-backup/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel Database Backup
=======================

[](#laravel-database-backup)

[![Latest Version on Packagist](https://camo.githubusercontent.com/15961a5a3ab0b44ac3ab76f768ced8cfbcc7749594010f21eb94cfd164372e10/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73756c61696d616e6261726b692f6c61726176656c2d64622d6261636b75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sulaimanbarki/laravel-db-backup)[![Total Downloads](https://camo.githubusercontent.com/bd1e99c14e670ec56b86a8b8a9b1b6db0b3ab497d18e0ec507e28a6e11437d0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756c61696d616e6261726b692f6c61726176656c2d64622d6261636b75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sulaimanbarki/laravel-db-backup)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A lightweight, zero-configuration Laravel package to quickly download your database as an SQL backup file directly from your browser.

Perfect for small-to-medium projects that need a fast, simple, and completely open database backup mechanism without any authorization constraints.

Caution

**Security Warning:** This package registers a public route `/backupdb` with **no authentication or authorization checks**. Anyone who visits this URL will be able to download your entire database. Use with caution or only in protected environments.

---

🚀 How It Works
--------------

[](#-how-it-works)

1. **Automatic Route Registration:** The package automatically registers a public route at `/backupdb` (named `db-backup.download`).
2. **No Authentication Constraints:** The route has no restrictions, making it accessible to both guests and authenticated users.
3. **Smart Backup Generation:**
    - Queries all database tables safely using `SHOW TABLES` and sanitizes identifiers.
    - Fetches table schemas using `SHOW CREATE TABLE`.
    - Generates fully standard, formatted `INSERT INTO` statements for all records (with proper handling for `NULL` values and SQL escaping).
4. **Zero Disk Footprint:** Streams the backup file (.sql) to the client immediately and deletes the temporary file from the server right after the transfer is complete.

---

📦 Installation
--------------

[](#-installation)

Install the package via composer:

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

### ⚙️ Auto-Discovery

[](#️-auto-discovery)

This package uses Laravel's package auto-discovery feature. The service provider `sulaimanbarki\DbBackup\DbBackupServiceProvider` is automatically registered. You don't need to manually add it to your `config/app.php`.

---

🛠️ Usage
--------

[](#️-usage)

Once installed, you can access the backup route `/backupdb` or dynamically link to it in your templates.

### Direct Access

[](#direct-access)

Navigate directly to:

```
https://your-domain.com/backupdb

```

### Linking in Blade Views

[](#linking-in-blade-views)

Generate a link to the download page using the route helper:

```

   Download Database Backup

```

---

🛠️ Tech Specs &amp; Support
---------------------------

[](#️-tech-specs--support)

- **PHP Version:** `^8.0`
- **Laravel Framework:** `^9.0`, `^10.0`, or `^11.0`
- **Database Engine:** MySQL / MariaDB (requires support for `SHOW TABLES` and `SHOW CREATE TABLE`).

---

📄 License
---------

[](#-license)

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

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance86

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Every ~0 days

Total

3

Last Release

67d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/406114c0122abf39f1d0699b6bd83a94bbb45e0aaa4e01cbe0543d784557ab9d?d=identicon)[sulaimanbarki](/maintainers/sulaimanbarki)

---

Top Contributors

[![sulaimanbarki](https://avatars.githubusercontent.com/u/99899527?v=4)](https://github.com/sulaimanbarki "sulaimanbarki (3 commits)")

### Embed Badge

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

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

###  Alternatives

[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.2k4.0k](/packages/leantime-leantime)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k8](/packages/statamic-rad-pack-runway)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3518.3k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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