Download the PHP package xve/laravel-db-export without Composer
On this page you can find all versions of the php package xve/laravel-db-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-db-export
Laravel DB Export
A Laravel package for database exports with profile-based exclusions, anonymization, and zero-impact exports.
Features
- Profile-based exports - Predefined configurations for different use cases
- Zero-impact exports - Uses
--single-transactionand--quickfor minimal database load - Compression - Automatic gzip compression with streaming for large databases
- Size estimation - Pre-flight disk space validation
- Structure-only tables - Export schema without data for large tables
- Anonymization - Mask or fake sensitive data (PII)
- Cleanup - Automatically remove old exports
Installation
Publish the configuration:
Configuration
MySQL/MariaDB Binary Path
If mysqldump is not in your PATH, set it in config/db-export.php or .env:
MariaDB Compatibility
For MariaDB, ensure MySQL-specific options are disabled:
Cleanup Old Exports
Automatically delete old exports before creating new ones:
Commands
Setup / Find mysqldump
Find the mysqldump binary and get configuration instructions:
This command searches common locations for mysqldump and displays:
- Found binary paths with versions
- Configuration instructions for
.envorconfig/db-export.php - Current configuration status
List Profiles
Estimate Export Size
Export Database
Prune Exports
Delete all export files:
Export Profiles
| Profile | Description |
|---|---|
default |
Clean export with structure-only for logs/cache/sessions and anonymized PII |
inspection |
Only telescope and audits (for debugging) |
Command Options
Table Selection
Output Options
Other Options
Examples
Standard Export
Exports everything with structure-only for logs/cache/sessions and anonymized PII.
Include Audit Data
Override structure-only to include audit data.
Debug Export
Exports only telescope and audit tables for debugging.
Specific Tables
Export only the tables you need — no profile required:
Structure Only (No Data)
Profiles Configuration
Define custom profiles in config/db-export.php:
Anonymization Strategies
Anonymization works with or without fakerphp/faker. If faker is installed, you get realistic fake data. Without it, simple fallbacks are used (e.g., User_a1b2c3d4, [email protected]).
Preserve Admin/Developer Accounts
Skip anonymization for rows where specific columns match certain email domains:
Users with @xve.be or @company.com emails will keep their original data while all other users are anonymized. Each table can specify which column to check.
Production Usage
Zero-Impact Exports
The Problem: Traditional mysqldump commands can severely impact production databases:
- Table locks block all writes during export
- Large result sets consume server memory
- Long-running exports cause timeouts and slow queries
The Solution: This package uses mysqldump options that eliminate these issues:
| Option | Problem Solved |
|---|---|
--single-transaction |
Creates a consistent snapshot using InnoDB's MVCC. No table locks, writes continue normally. |
--quick |
Streams rows directly to output instead of buffering in memory. Handles multi-GB tables without memory issues. |
--skip-lock-tables |
Prevents LOCK TABLES command that would block all writes. |
With these options, you can safely export a production database while the application continues serving requests with no degradation.
Best Practices
-
Use a read replica for exports when possible:
-
Schedule during low-traffic hours
-
Use structure-only for large tables like audits:
- Monitor during export:
Output Location
Default: storage/app/db-exports/
Files are named: {database}_{date}_{time}_{profile}.sql.gz
Example: my_app_2026-01-15_14h30_default.sql.gz
See Also
- Package Comparison - SWOT analysis vs other Laravel backup packages
License
MIT
All versions of laravel-db-export with dependencies
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
spatie/db-dumper Version ^3.4