Skip to content

Installation

Prerequisites

  • PHP 8.2 or higher
  • Composer (for the library install)
  • mysql / mysqldump (or psql / pg_dump for PostgreSQL) and gzip / gunzip available on the executing host(s)
  • rsync for fast transfers (optional — SFTP is used automatically if rsync is missing)
  • sshpass only if you need password-based rsync

Install php-sync-tool into your project from Packagist:

bash
composer require konradmichalik/php-sync-tool

The executable is then available at vendor/bin/sync-tool:

bash
vendor/bin/sync-tool --help

TIP

Throughout this documentation the command is written as bin/sync-tool for brevity. Use vendor/bin/sync-tool for a Composer install, or sync-tool.phar for the standalone build.

Standalone PHAR

For use outside a Composer project (for example on a deploy host or in CI), grab the single-file PHAR build. It bundles all dependencies and only needs PHP 8.2+:

bash
# Make it executable and run it directly
chmod +x sync-tool.phar
./sync-tool.phar --help

Verify Installation

bash
# View available options
bin/sync-tool --help

Next Steps

Released under the GPL-3.0-or-later License.