PHPackages                             toyi/sync-database - 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. toyi/sync-database

ActiveLibrary[Database &amp; ORM](/categories/database)

toyi/sync-database
==================

Sync your MySQL local database with a remote one.

v2.1.0(3mo ago)08.6k↑29.8%1MITPHPPHP &gt;=8.1

Since Jul 8Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/toyi/sync-database)[ Packagist](https://packagist.org/packages/toyi/sync-database)[ RSS](/packages/toyi-sync-database/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (31)Used By (0)

Description
===========

[](#description)

Use this package to synchronize your local development MySQL database with a remote one (e.g., production). It'll connect through SSH to a remote server, make a dump, download it and import it into your local MySQL database.

Prerequisites
=============

[](#prerequisites)

### Local environment

[](#local-environment)

- mysql binary (`mysql --version`)
- GZip (`gzip --version`)

### Remote environment

[](#remote-environment)

- mysqldump binary (`mysqldump --version`)
- GZip (`gzip --version`)

Limitations
===========

[](#limitations)

- This package only supports MySQL
- It only supports databases hosted on the remote server you provided (local machine &gt; remote machine &gt; dump &gt; local machine)

Installation
============

[](#installation)

`composer require toyi/sync-database`

### Before Laravel 5.5

[](#before-laravel-55)

After updating composer, add the SyncDatabaseProvider to the providers array in `config/app.php``Toyi\SyncDatabase\SyncDatabaseProvider::class,`

Usage
=====

[](#usage)

You should publish the `config/sync-database.php` config file using `php artisan vendor:publish --provider="Toyi\SyncDatabase\SyncDatabaseProvider"`.

The `ssh` part will be used to connect to your remote server.
The `database` part will be used to dump the remote database.

Once everything is configured, use `php artisan toyi:sync-database`.

Available options :

- `--tables-no-data` A comma separated list of tables. Only their structure will be dumped (no data)
- `--no-migrations` Don't execute pending migrations at the end.

**The remote database will only be dumped, nothing will ever be written.**

The temporary files are deleted once the dump process is over.
However, should something fail, they might persist (and take unecessary disk space). If this is the case, you can delete them yourself (they will be located in the /tmp directory of both the local and remote machines).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance79

Regular maintenance activity

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 97.9% 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 ~60 days

Total

30

Last Release

114d ago

Major Versions

v1.10.0 → v2.0.02025-05-21

PHP version history (2 changes)v1.6.0PHP &gt;=7.4

v2.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![toyi](https://avatars.githubusercontent.com/u/15825155?v=4)](https://github.com/toyi "toyi (46 commits)")[![Magik-72](https://avatars.githubusercontent.com/u/81683005?v=4)](https://github.com/Magik-72 "Magik-72 (1 commits)")

### Embed Badge

![Health badge](/badges/toyi-sync-database/health.svg)

```
[![Health](https://phpackages.com/badges/toyi-sync-database/health.svg)](https://phpackages.com/packages/toyi-sync-database)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.2k45.4M704](/packages/spatie-laravel-medialibrary)[spatie/laravel-backup

A Laravel package to backup your application

6.0k25.4M272](/packages/spatie-laravel-backup)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M317](/packages/laravel-ai)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

731189.9k16](/packages/tallstackui-tallstackui)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

503.4k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

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