acpl / flarum-db-dumper
Dump the contents of a Flarum database
Fund package maintenance!
android-com-pl
rafaucau
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:flarum-extension
Requires
- php: >=8.1
- flarum/core: ^1.8
- spatie/db-dumper: ^3.7
This package is auto-updated.
Last update: 2025-01-23 12:34:19 UTC
README
Database backup extension for Flarum that allows dumping database content using the db:dump
command.
Installation
composer require acpl/flarum-db-dumper
Usage
Basic usage:
# Dump to storage/dumps/dump-YYYY-MM-DD-HHMMSS.sql php flarum db:dump # Dump to specific path/file php flarum db:dump /path/to/backup.sql php flarum db:dump ../backups/forum.sql # Dump with compression (based on extension) php flarum db:dump /backups/dump.sql.gz # gzip compression php flarum db:dump /backups/dump.sql.bz2 # bzip2 compression # Create backup on live site without locking tables php flarum db:dump --single-transaction --quick --lock-tables=false
Options
--compress
: Use compression (gz
orbz2
), e.g.--compress=gz
for gzip--include-tables=table1,table2
: Include only specific tables--exclude-tables=table1,table2
: Exclude specific tables--skip-structure
: Skip table structure--no-data
: Skip table data, dump only structure--skip-auto-increment
: Skip AUTO_INCREMENT values--no-column-statistics
: Disable column statistics (for MySQL 8 compatibility)--binary-path=/path/to/binary
: Custom mysqldump binary location
Additionally, most of the standard mysqldump options are supported (like --single-transaction
, --quick
, --lock-tables
, etc).
Check mysqldump documentation for available options.
Requirements
mysqldump
binarygzip
for.gz
compressionbzip2
for.bz2
compression