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(2mo ago)08.1k↑17.3%1MITPHPPHP &gt;=8.1

Since Jul 8Pushed 2mo 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 today

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

52

—

FairBetter than 96% of packages

Maintenance86

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

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

68d 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.1k43.2M631](/packages/spatie-laravel-medialibrary)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.5k91.9M594](/packages/laravel-passport)[spatie/laravel-backup

A Laravel package to backup your application

6.0k24.4M243](/packages/spatie-laravel-backup)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k36.8M156](/packages/owen-it-laravel-auditing)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3596.2k](/packages/baril-bonsai)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

492.8k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

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