PHPackages                             drands/deployer-sync - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. drands/deployer-sync

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

drands/deployer-sync
====================

A Laravel package to synchronize database and uploaded files between local and remote servers using Deployer.

1.0.14(1mo ago)21.2k↓57.3%MITPHPPHP &gt;=8.1

Since Apr 16Pushed 1mo ago2 watchersCompare

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

READMEChangelogDependencies (9)Versions (16)Used By (0)

Deployer Sync
=============

[](#deployer-sync)

This package provides a set of commands to synchronize uploaded files and database between a remote server and your local machine using Deployer.

Installation
------------

[](#installation)

Install the package using Composer:

```
composer require drands/deployer-sync
```

Add the following to your `deploy.yml` file:

```
import:
  - vendor/drands/deployer-sync/src/recipe/sync.php
```

You must also set the `local_php_path` variable with the path to your PHP executable on your local machine. For example:

```
local_php_path: php
```

**Important:** Before you can execute actions on the remote server, you must perform a deployment.

Usage
-----

[](#usage)

### Full sync files and database from remote server to local machine

[](#full-sync-files-and-database-from-remote-server-to-local-machine)

```
dep sync:prod-to-local
```

### Only export files and database from remote server and download to local machine

[](#only-export-files-and-database-from-remote-server-and-download-to-local-machine)

```
dep sync:export-to-local
```

### Full sync including S3 file clone (if your uploads disk is S3-compatible)

[](#full-sync-including-s3-file-clone-if-your-uploads-disk-is-s3-compatible)

```
dep sync:prod-to-local-s3
```

This is a shortcut for `dep sync:prod-to-local -o s3=true` — `-o s3=true` also works directly on `sync:prod-to-local` or `sync:export-to-local` if you'd rather not use the extra task.

### Only import files and database from sync\_export.zip

[](#only-import-files-and-database-from-sync_exportzip)

```
dep sync:import-from-local
```

### Only clone uploaded files from the production bucket to your local development prefix

[](#only-clone-uploaded-files-from-the-production-bucket-to-your-local-development-prefix)

```
dep sync:clone-storage
```

Syncing uploaded files on S3-compatible storage (e.g. DigitalOcean Spaces)
--------------------------------------------------------------------------

[](#syncing-uploaded-files-on-s3-compatible-storage-eg-digitalocean-spaces)

`sync:export`/`sync:export-to-local` only handle files that live on local disk (`storage/app`) on the remote server. If your uploads disk is S3-compatible, those files never touch the server's local disk, so passing `-o s3=true` to `sync:export-to-local` (or `sync:prod-to-local`) makes it also pass `--s3` to the remote `sync:export` call, which copies the files directly from the production bucket to a development bucket, server-side, in the same remote call (no data passes through your local machine or the deploy server's disk). Without `-o s3=true`, nothing S3-related runs. A standalone `sync:clone-storage` task/command is also available if you need to (re-)run just the file clone without a full export.

This requires:

- A **separate bucket for development**, shared by all developers, since S3-compatible providers (e.g. DigitalOcean Spaces) generally scope access keys per bucket, not per prefix within a bucket. Keeping production and development in the same bucket would mean a developer's key would also need read access to production data.
- Each developer's own key restricted to the development bucket only, writing under their own prefix (`filesystems.disks.s3.root`, e.g. via a `DO_PREFIX=local/yourname` env var).
- The production key additionally granted **write access to the development bucket** (on top of its existing production access), so the copy can run entirely on the server. Set the destination bucket name in the production environment:

```
SYNC_DEV_BUCKET=your-dev-bucket-name

```

- If your uploads disk isn't the app's default filesystem disk, set which disk to read from:

```
SYNC_DISK=s3

```

`sync:clone-storage` mirrors production into your development prefix: unchanged files (matched by ETag) are skipped, and any file under your prefix that no longer exists in production is **deleted**, including files you may have uploaded manually while testing locally. It's safe and idempotent to run repeatedly.

If the configured uploads disk isn't S3-compatible, `--s3` is a no-op and `storage/app` files continue to sync through the existing ZIP-based flow.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~33 days

Recently: every ~0 days

Total

15

Last Release

31d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1612938?v=4)[Dani F. Serch](/maintainers/daniouyea)[@daniouyea](https://github.com/daniouyea)

![](https://www.gravatar.com/avatar/2cc8e65968f889dff8d685730d1ad08ae5d153f07d21f3aa36262960be182033?d=identicon)[drands](/maintainers/drands)

---

Top Contributors

[![daniouyea](https://avatars.githubusercontent.com/u/1612938?v=4)](https://github.com/daniouyea "daniouyea (30 commits)")

### Embed Badge

![Health badge](/badges/drands-deployer-sync/health.svg)

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

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k212.4M1.5k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M328](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M234](/packages/laravel-mcp)[tallstackui/tallstackui

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

731189.9k16](/packages/tallstackui-tallstackui)[propaganistas/laravel-disposable-email

Disposable email validator

6023.2M7](/packages/propaganistas-laravel-disposable-email)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

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