Download the PHP package basantsd/db-backup-laravel-ci without Composer
On this page you can find all versions of the php package basantsd/db-backup-laravel-ci. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download basantsd/db-backup-laravel-ci
More information about basantsd/db-backup-laravel-ci
Files in basantsd/db-backup-laravel-ci
Package db-backup-laravel-ci
Short Description A Laravel and CI package for daily database backups sent via email
License MIT
Homepage https://github.com/basantsd/db-backup-laravel-ci
Informations about the package 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
- 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
Environment variables
Add these entries to your .env
file:
Laravel setup
-
Publish the configuration file:
- Schedule the command in
app/Console/Kernel.php
:
CodeIgniter setup
-
Add a route to
routes.php
: - Call the route with the token header:
Usage
Laravel
Run the artisan command:
CodeIgniter
Access the /backup/daily
URL with the header shown above.
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
The MIT License (MIT). Please see the LICENSE file for more information.