velikonja/sync-fs

PHP Library with command line tool for simple syncing folders via configuration file.

0.2 2014-11-04 21:58 UTC

This package is auto-updated.

Last update: 2024-03-29 03:19:04 UTC


README

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

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 ./