# spatie/db-dumper

Dump the contents of a database

Repository: https://github.com/spatie/db-dumper
Canonical: https://ross.abutalabs.com/products/db-dumper
Homepage: https://freek.dev/389-a-package-to-dump-your-database
Language: PHP
License: MIT
License Family: permissive
Topics: php, database, mysql, postgresql, dump, sql
Last push: 2026-06-26T09:50:52+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 70, longevity 100
- inputs: {"age_days": 3881, "days_push": 68, "days_rel": 121, "gap_med": 41, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1176, forks 158 (observed 2026-08-28T04:03:52.631129+00:00)

## What it is
A PHP library providing a fluent API to dump database contents to files using native tools like mysqldump, pg_dump, sqlite3, and mongodump. It supports MySQL, MariaDB, PostgreSQL, SQLite, and MongoDB and is used by spatie's laravel-backup package.

## Use cases
- dump a mysql database to a sql file from php
- create postgresql backups programmatically
- back up sqlite and mongodb databases in php
- generate database dumps for a laravel backup system
- compress database dumps with gzip or bzip2

## When to choose
- you need to create database dumps from PHP code with a simple fluent API
- you want a lightweight wrapper around native dump binaries rather than reimplementing dump logic
- you are building a backup system, especially with spatie/laravel-backup

## When to avoid
- you need pure-PHP dumping without native binaries like mysqldump installed
- you need a full backup solution with scheduling and notifications rather than just dumping
- you use databases outside MySQL, MariaDB, PostgreSQL, SQLite, or MongoDB

## Facets
- artifact type: library
- maturity: stable
- function: database, backup, developer-tools
- domain: databases, developer-tools, backend
- platform: php, cli, cross-platform
- tags: database-dump, mysqldump, pg_dump, mongodb, sqlite, mariadb, spatie

## Member repositories
- spatie/db-dumper (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:52.631129+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:26:36.235284+00:00, confidence not recorded.
  - readme: https://github.com/spatie/db-dumper (fetched 2026-08-28T04:03:52.631129+00:00, sha 650ee6eeee77)
  - homepage: https://freek.dev/389-a-package-to-dump-your-database (fetched 2026-08-29T12:32:59.267652+00:00, sha cb93934cd333)
  - site_page: https://freek.dev/about (fetched 2026-08-29T12:32:59.276658+00:00, sha e0ef9dccbb05)
- Data as of 2026-08-30T08:39:29.467469+00:00.
