Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mysqldump Php Laravel Package

druidfi/mysqldump-php

Pure-PHP MySQL dump library that creates SQL backups without shelling out to mysqldump. It supports tables, views, triggers, compression, and configurable output, making portable database backups easy in Laravel and PHP applications.

Deep Wiki
Context7

Product Decisions This Supports

  • Feature: user- and tenant-facing data export. Backs "download my data" flows, GDPR/CCPA portability requests, and B2B offboarding exports without an ops ticket. The dump runs inside a queued job, so the product surface is a button, not a runbook.
  • Feature: self-serve backup/snapshot for smaller deployments. For single-tenant installs and on-prem customers who expect a "backup now" control, this removes the need for a DBA or a cron entry on the host.
  • Build vs buy: buy (adopt) over a bespoke dumper. The alternative is 300–800 lines of hand-rolled SHOW CREATE TABLE / escaping / trigger / view / routine handling. This package already encodes that edge-case knowledge. Unless dumping is your differentiator, owning that code is a tax.
  • Build vs buy: not a replacement for infrastructure backups. Position it as application-level logical export, not disaster recovery. Roadmap still needs platform snapshots (RDS automated backups, volume snapshots, PITR) for RPO/RTO commitments.
  • Roadmap enabler: environment promotion and seeding. Structure-only dumps and per-table WHERE filters make realistic test fixtures and anonymized staging refreshes cheap, which accelerates QA and demo environments.
  • Roadmap enabler: migration safety net. Pre-migration logical snapshots turn a risky schema change into a rollback-able event, which is often the gate that blocks shipping a migration at all.
  • Deployment constraint removal. Many managed PHP hosts and slim containers disable exec() or omit the mysql-client binary. This package makes export work in those environments, which widens the addressable deployment matrix.

When to Consider This Package

Adopt when:

  • You need to produce a logical dump from inside the PHP application (Artisan command, queued job, scheduled task), not from a DBA workstation.
  • Target is MySQL/MariaDB only, and you control the schema.
  • Dataset is modest — single-digit GB per dump, or you can scope by table / WHERE clause / structure-only.
  • You need the knobs it exposes: table include/exclude, --where filters, structure vs. data, compression, views/triggers/routines, output to file or stream.
  • Hosting forbids shelling out to mysqldump, or you don't want a binary in the image.
  • GPL-3.0 is acceptable — fine for internal tooling and for a hosted SaaS where you don't distribute the binary; requires legal review the moment you ship it inside a distributed product or on-prem appliance.
  • You accept vendor risk: 35 stars means no meaningful community, so plan to vendor/fork it and name an internal owner. Note that the codebase descends from the widely used ifsnop/mysqldump-php lineage — pedigree is better than the star count suggests, but the maintenance commitment is still yours.

Look elsewhere when:

  • Databases are large (tens to hundreds of GB) or dumps must complete under production write load — use mydumper, Percona XtraBackup, or native cloud snapshots.
  • You need point-in-time recovery, binlog-based replication, or physical backups. Logical dumps alone cannot meet a tight RTO.
  • You need Postgres, SQL Server, or multi-engine support.
  • You're already on a managed platform whose automated backups satisfy the requirement — don't build a second, weaker backup path.
  • You're pursuing SOC 2 / ISO 27001 and must evidence backup tooling. A 35-star GPL fork is a hard conversation with an auditor; use a vendor with a support contract.
  • Any scenario where you'd redistribute the package in a proprietary product without accepting copyleft obligations.
  • Your real need is streaming/continuous replication or CDC — this is a batch dump tool, wrong tool entirely.

How to Pitch It (Stakeholders)

To executives: We can ship self-serve data export and pre-migration snapshots this quarter without an infrastructure project. It's a Composer dependency — days of integration, not weeks of engineering — and it works on our managed hosting where we can't call the system mysqldump binary. Two caveats to accept knowingly: the license is GPL-3.0 (safe for internal and hosted use, needs legal sign-off if it ever ships inside a distributed product), and the project is small, so we'll pin a version and own the fork. It does not replace platform backups — RPO/RTO still come from infrastructure snapshots. Recommendation: approve a two-week spike, ship behind an internal DatabaseDumper interface so swapping to native tooling or a managed service later is a one-file change.

To engineering: Pure PHP, Composer-installable, no binary or exec() dependency, configurable via an array or fluent options — table filters, WHERE clauses, structure-only, compression, views/triggers/routines. Wrap it behind our own interface, don't call it directly from controllers; run dumps in a queue worker with a memory and time ceiling. Test the restore path, not just the dump — that's where logical exports actually fail. Watch table size and lock behavior on InnoDB under write load, and set --single-transaction-equivalent options deliberately. Budget for vendoring the fork and pinning minor versions; upstream activity is thin enough that surprise breaks are more likely than surprise wins.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core