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

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

basantsd/db-backup-laravel-ci
=============================

A Laravel and CI package for daily database backups sent via email

v1.0.0(1y ago)01.6kMITPHPPHP &gt;=7.2.5

Since Jun 24Pushed 11mo ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

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

[](#db-backup-laravel-ci)

A framework agnostic package to automatically back up your database and send the result via email. It supports both Laravel and CodeIgniter applications.

Features
--------

[](#features)

- Works with MySQL, PostgreSQL, SQL Server and SQLite databases
- Creates a SQL dump and compresses it using `gzip`
- Emails the compressed dump on a daily schedule
- If the gzipped file exceeds the configured size limit (25 MB by default) it is saved to disk and a download path is emailed instead

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

[](#installation)

```
composer require basantsd/db-backup-laravel-ci
```

Environment variables
---------------------

[](#environment-variables)

Add these entries to your `.env` file:

```
BACKUP_EMAIL=your-email@example.com
BACKUP_TOKEN=your-secret-token
APP_NAME="project-name"
# Optional: override the maximum attachment size in bytes (default 26214400)
BACKUP_MAX_ATTACHMENT_SIZE=26214400
```

Laravel setup
-------------

[](#laravel-setup)

1. Publish the configuration file: ```
    php artisan vendor:publish --provider="Basantsd\\Backup\\Laravel\\BackupServiceProvider" --tag="config"
    ```
2. Schedule the command in `app/Console/Kernel.php`: ```
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('backup:daily', ['--token' => config('backup.token')])->daily();
    }
    ```

CodeIgniter setup
-----------------

[](#codeigniter-setup)

1. Add a route to `routes.php`: ```
    $route['backup/daily'] = 'BackupController/daily';
    ```
2. Call the route with the token header: ```
    curl -H "X-Backup-Token: your-secret-token" http://your-domain.com/backup/daily
    ```

Usage
-----

[](#usage)

### Laravel

[](#laravel)

Run the artisan command:

```
php artisan backup:daily --token=your-secret-token
```

### CodeIgniter

[](#codeigniter)

Access the `/backup/daily` URL with the header shown above.

Handling large backups
----------------------

[](#handling-large-backups)

Many email providers reject attachments larger than 20–25 MB. When the compressed backup exceeds `BACKUP_MAX_ATTACHMENT_SIZE`, this package saves the file to a `backups` directory (`storage/app/backups` for Laravel or `APPPATH/backups` for CodeIgniter) and sends an email containing the path to download the backup manually.

License
-------

[](#license)

The MIT License (MIT). Please see the LICENSE file for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance43

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

687d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55a051208625438a1faf288b2c5be5cb6b8e5dad59d2150615f067600ef9692c?d=identicon)[basantsd](/maintainers/basantsd)

---

Top Contributors

[![basantsd](https://avatars.githubusercontent.com/u/34518191?v=4)](https://github.com/basantsd "basantsd (15 commits)")

---

Tags

database backupdaily-backuplaravel ci backup

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[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)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)

PHPackages © 2026

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