Installation
Prerequisites
- PHP 8.2 or higher
- Composer (for the library install)
mysql/mysqldump(orpsql/pg_dumpfor PostgreSQL) andgzip/gunzipavailable on the executing host(s)rsyncfor fast transfers (optional — SFTP is used automatically if rsync is missing)sshpassonly if you need password-based rsync
Composer (Recommended)
Install php-sync-tool into your project from Packagist:
bash
composer require konradmichalik/php-sync-toolThe executable is then available at vendor/bin/sync-tool:
bash
vendor/bin/sync-tool --helpTIP
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 --helpVerify Installation
bash
# View available options
bin/sync-tool --helpNext Steps
- Quick Start — your first database sync
- Configuration — learn about configuration options