PHPackages                             acpl/flarum-db-snapshots - 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. acpl/flarum-db-snapshots

ActiveFlarum-extension[Database &amp; ORM](/categories/database)

acpl/flarum-db-snapshots
========================

Create and restore database snapshots for Flarum via CLI

v1.0.1(2mo ago)020—0%MITPHPPHP ^8.1CI passing

Since Mar 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/android-com-pl/flarum-db-snapshots)[ Packagist](https://packagist.org/packages/acpl/flarum-db-snapshots)[ Docs](https://github.com/android-com-pl/flarum-db-snapshots)[ GitHub Sponsors](https://github.com/android-com-pl/flarum-db-snapshots?sponsor=1)[ RSS](/packages/acpl-flarum-db-snapshots/feed)WikiDiscussions main Synced 1mo ago

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

Flarum Database Snapshots
=========================

[](#flarum-database-snapshots)

[![Latest Stable Version](https://camo.githubusercontent.com/84660fee7a6997bf5d6777898e2dab0e8b843dc3f4719df64a3b06ac9590a11c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6163706c2f666c6172756d2d64622d736e617073686f7473)](https://packagist.org/packages/acpl/flarum-db-snapshots) [![Total Downloads](https://camo.githubusercontent.com/945d2f94e738b39721f210e2e48412928c419203f10d367dbe09b1a30167a380/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6163706c2f666c6172756d2d64622d736e617073686f74732e737667)](https://packagist.org/packages/acpl/flarum-db-snapshots/stats) [![GitHub Sponsors](https://camo.githubusercontent.com/5c68940361d1e0d29b21caab7c8c56a3eacd733d5825f1331e17ea69f5e105ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d2545322539442541342d2532336462363161322e7376673f266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d313831373137)](https://github.com/android-com-pl/flarum-db-snapshots?sponsor=1)

This extension provides commands to quickly create and restore database snapshots for Flarum.

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

[](#installation)

```
composer require acpl/flarum-db-snapshots
```

Create Snapshot
---------------

[](#create-snapshot)

Create a database snapshot using the `snapshot:create` command.

Basic usage:

```
# Dump to storage/snapshots/snapshot-Y-m-d-His.sql
php flarum snapshot:create

# Dump to a specific path/file
php flarum snapshot:create /path/to/backup.sql
php flarum snapshot:create ../backups/forum.sql

# Dump with compression (based on extension)
php flarum snapshot:create /backups/dump.sql.gz   # gzip compression
php flarum snapshot:create /backups/dump.sql.bz2  # bzip2 compression

# Create a backup on a live site without locking tables (recommended for production)
php flarum snapshot:create --single-transaction --quick --lock-tables=false
```

### Options for Creation

[](#options-for-creation)

- `--compress`: Compression type (`gz` or `bz2`).
- `--include-tables=table1,table2`: Include only specific tables in the snapshot.
- `--exclude-tables=table1,table2`: Exclude specific tables from the snapshot.
- `--skip-structure`: Skip table structure and do not include `CREATE TABLE` statements.
- `--no-data`: Dump schema only, without row data.
- `--skip-auto-increment`: Skip `AUTO_INCREMENT` values.
- `--no-column-statistics`: Disable column statistics.
- `--binary-path=/path/to/binary`: Custom path to the `mysqldump` binary.

Most standard `mysqldump` options are also supported, such as `--single-transaction`, `--quick`, and `--lock-tables`. See the [mysqldump documentation](https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html) for details.

Load Snapshot
-------------

[](#load-snapshot)

Restore a database from an existing snapshot using the `snapshot:load` command.

Basic usage:

```
# Restore from a standard SQL file
php flarum snapshot:load /path/to/backup.sql

# Restore directly from a compressed file (automatically decompressed on the fly)
php flarum snapshot:load /path/to/backup.sql.gz
php flarum snapshot:load /path/to/backup.sql.bz2
```

### Options for Loading

[](#options-for-loading)

- `--drop-tables`: Drop all existing tables before loading the snapshot. Useful when restoring a full backup into an existing database to avoid conflicts.
- `--binary-path=/path/to/binary`: Custom path to the `mysql` binary.

Requirements
------------

[](#requirements)

- `mysql` and `mysqldump` binaries
- `gzip` for `.gz` snapshots
- `bzip2` for `.bz2` snapshots

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/acpl/flarum-db-snapshots)
- [GitHub](https://github.com/android-com-pl/flarum-db-snapshots)
- [Discuss](https://discuss.flarum.org/d/38880-flarum-database-snapshots)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance88

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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

Every ~0 days

Total

2

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eeb64214aa3264c9725d7ed0c0d066d3a3539f10152b390845f17532deffe580?d=identicon)[rafaucau](/maintainers/rafaucau)

---

Top Contributors

[![rafaucau](https://avatars.githubusercontent.com/u/25438601?v=4)](https://github.com/rafaucau "rafaucau (13 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

---

Tags

backupflarumflarum-extensionmysqldump

### Embed Badge

![Health badge](/badges/acpl-flarum-db-snapshots/health.svg)

```
[![Health](https://phpackages.com/badges/acpl-flarum-db-snapshots/health.svg)](https://phpackages.com/packages/acpl-flarum-db-snapshots)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M190](/packages/spatie-laravel-backup)[spatie/laravel-db-snapshots

Quickly dump and load databases

1.2k2.8M20](/packages/spatie-laravel-db-snapshots)

PHPackages © 2026

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