PHPackages                             genesis/db-backup-restore - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. genesis/db-backup-restore

ActiveLibrary[Testing &amp; Quality](/categories/testing)

genesis/db-backup-restore
=========================

Quickly backup and restore your local database after a test run.

0.2.3(6y ago)117[1 issues](https://github.com/forceedge01/db-backup-restore/issues)MITPHPPHP ~7.0CI failing

Since Sep 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/forceedge01/db-backup-restore)[ Packagist](https://packagist.org/packages/genesis/db-backup-restore)[ RSS](/packages/genesis-db-backup-restore/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (8)Used By (0)

DB backup restore
=================

[](#db-backup-restore)

Use this package to quickly backup and restore your database during test execution.

Key features:

- A backup is created before any tests are executed.
- The database backup process will halt the execution plan if there is an error.
- The backup is restored after all tests have been executed.
- The restore plan will not execute if the backup has failed.

Supported databases:

- mysql
- Feel free to submit a PR, its pretty easy to add support for one.

This project is usually only suitable where the database is small and fairly quick to backup and restore. Using it locally can help when your tests amend the database state while executing and you need the data reset afterwards.

This extension is not yet unit tested so please report any bugs you may find to help the development of this extension. Thanks!

Sample behat.yml file

```
default:
  formatters:
        pretty: true
  suites:
    default:
      contexts:
        - FeatureContext
  extensions:
        Genesis\DBBackup\Extension:
            autoBackup: true
            autoRestore: true
            autoRemove: true
            backupPath: ./backups # You'll need to create this folder.
            keepClean: false # Will remove all backups test suite ends, can get rid of lingering files.
            connections:
                mysql:
                    engine: mysql
                    host: 127.0.0.1
                    port: 3307
                    dbname: cms
                    username: cms
                    password: cms
                    schema:
                    prefix:
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

7

Last Release

2422d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4529502cab11a6993a59a1d1a2818f438d073636e3f59dd617a259be74e3feae?d=identicon)[forceedge](/maintainers/forceedge)

---

Top Contributors

[![forceedge01](https://avatars.githubusercontent.com/u/1619816?v=4)](https://github.com/forceedge01 "forceedge01 (15 commits)")

---

Tags

testingtestbrowserwebdatadatabaseBDDmysqlsqlpdoBehat

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/genesis-db-backup-restore/health.svg)

```
[![Health](https://phpackages.com/badges/genesis-db-backup-restore/health.svg)](https://phpackages.com/packages/genesis-db-backup-restore)
```

###  Alternatives

[genesis/behat-sql-extension

SQL/PDO extension that facilitates fixture data creation on the fly for Behat

1179.9k3](/packages/genesis-behat-sql-extension)[robertfausk/behat-panther-extension

Symfony Panther extension for Behat

341.7M87](/packages/robertfausk-behat-panther-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)[playwright-php/playwright

Modern PHP library for Playwright automation: browsing, scraping, screenshots, testing, and more.

7613.0k5](/packages/playwright-php-playwright)[drupal/tqextension

Behat extension for testing Drupal sites

1134.4k](/packages/drupal-tqextension)

PHPackages © 2026

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