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.0.4(8mo ago)07.1k↑12.5%1MITPHPPHP &gt;=8.1

Since Jul 8Pushed 1mo 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 1mo ago

READMEChangelog (10)Dependencies (3)Versions (29)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

49

—

FairBetter than 95% of packages

Maintenance77

Regular maintenance activity

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 97.8% 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 ~56 days

Recently: every ~30 days

Total

28

Last Release

240d 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 (45 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-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[ryangjchandler/orbit

A flat-file database driver for Eloquent.

922256.2k5](/packages/ryangjchandler-orbit)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[yii2tech/illuminate

Yii2 to Laravel Migration Package

11315.1k](/packages/yii2tech-illuminate)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3593.5k](/packages/baril-bonsai)

PHPackages © 2026

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