Download the PHP package joeymckenzie/sqlighter without Composer
On this page you can find all versions of the php package joeymckenzie/sqlighter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joeymckenzie/sqlighter
More information about joeymckenzie/sqlighter
Files in joeymckenzie/sqlighter
Package sqlighter
Short Description A Laravel package for backing up your SQLite database.
License MIT
Homepage https://github.com/joeymckenzie/sqlighter
Informations about the package sqlighter
SQLighter: Backup Commands for your SQLite Databases
SQLighter is a lightweight SQLite backup solution for Laravel applications. SQLighter provides automated backups of your SQLite database with configurable retention policies, while allowing for manual backups through an artisan command.
- 🔄 Automated SQLite database backups
- ⚙️ Configurable backup frequency
- 📦 Backup file rotation with configurable retention
- 🗂️ Automatic backup directory creation
- 🚫 Git-friendly (auto-generates appropriate .gitignore)
- 💡 Simple integration with Laravel's scheduler
Installation
You can install the package via composer:
Usage
After installation, publish the configuration file:
This will create a config/sqligther.php
configuration file. Customize the options to fit your needs:
Automatic Backups
SQLighter automatically registers a scheduled command to perform backups based on your configuration. No additional setup is required other than ensuring your Laravel scheduler is running:
Backups are configured to run every six hours by default, though can be overridden using the sqlighter.frequency
configuration option. Any valid cron string will work:
Manual Backups
You can also trigger a backup manually using the provided Artisan command:
Backup Storage
Backups are stored in your Laravel database directory under the configured storage_folder
(default: backups/
). A
.gitignore
file is automatically created to prevent backups from being committed to your repository.
File Naming
Backup files are named using the following format:
For example: backup-1698765432.sql
Testing
Pest is used to test the backup command. To run tests, just use the composer script:
Security Vulnerabilities
If you discover a security vulnerability within SQLighter, please send an e-mail to Joey McKenzie via [email protected].
License
The MIT License (MIT). Please see License File for more information.