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.2.0(2mo ago)163↓75.6%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 2.x Synced 3w ago

READMEChangelog (6)Dependencies (4)Versions (10)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/563cd5e34c6bc6901b413c606c1fd851d516f9bd4140569109e921f48b7250b1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537570706f72742d2545322539442541342d2532336462363161322e7376673f266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d313831373137)](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 storage/snapshots/my-snapshot.sql
php flarum snapshot:create my-snapshot.sql

# 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:

```
# Select a snapshot interactively from storage/snapshots
php flarum snapshot:load
# Load a specific snapshot from the default storage/snapshots directory
php flarum snapshot:load my-snapshot.sql.gz

# 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.
- `--force`, `-f`: Bypass the confirmation prompt when using `--drop-tables`.
- `--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

40

—

FairBetter than 86% of packages

Maintenance82

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.4% 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 ~2 days

Total

9

Last Release

89d ago

Major Versions

v1.0.1 → v2.0.0-beta.12026-03-23

v1.1.0 → v2.0.0-beta.22026-03-29

v1.2.0 → 2.x-dev2026-03-29

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0-beta.1PHP ^8.3

### 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 (19 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (3 commits)")

---

Tags

backupflarumflarum-extensionmysqlmysqldump

### 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.0k23.4M229](/packages/spatie-laravel-backup)[spatie/laravel-db-snapshots

Quickly dump and load databases

1.2k3.0M22](/packages/spatie-laravel-db-snapshots)[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1936.5k](/packages/flarum-lang-french)[flarum-lang/german

German language pack for Flarum.

2149.7k](/packages/flarum-lang-german)

PHPackages © 2026

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