velikonja / sync-fs
PHP Library with command line tool for simple syncing folders via configuration file.
Installs: 7 806
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.3
- symfony/config: >=2.3
- symfony/console: >=2.3
- symfony/filesystem: >=2.3
- symfony/finder: >=2.3
- symfony/process: >=2.3
- symfony/yaml: >=2.3
Requires (Dev)
- kherge/box: ~2.0
- phpunit/phpunit: 4.1.*
- squizlabs/php_codesniffer: ~1.5
This package is auto-updated.
Last update: 2024-11-29 04:57:35 UTC
README
PHP Library with command line tool for simple syncing folders via configuration file.
SyncFS is PHP5 library build on Symfony components. Via simple configuration file written in YAML, you can define folders that you would like to sync, locally or remotely.
Usage examples
- Backing up local folder to external hard drive.
- Backing up local folder to remote machine.
- Syncing production assets to local machine for easier development.
- Syncing production assets to staging / beta environment for better mimicking of production.
Dependencies
- Rsync - command line tool
- Linux or OSX machine.
Install as tool
Via as composer
$ composer global require "velikonja/sync-fs"
Usage
$ ~/.composer/vendor/bin/syncfs
Add folder ~/.composer/vendor/bin/
to $PATH
variable for global usage.
Install as library
$ composer require "velikonja/sync-fs"
Setup and usage of tool
- First run
syncfs init
to create example config file in home folder (you can change config path via command arguments). - Edit config file.
- Run
syncfs sync
. - Explore other possibilities with
syncfs list
.
Contributing
Install dependencies
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install --dev
Tests
PHPUnit tests
$ vendor/bin/phpunit
Coding standards tests
$ phpcs --standard=PSR2 --ignore=/vendor --ignore=/log ./