Console tool to synchronize files in two directories.
git clone https://github.com/HopeUA/dir-sync.git dir-sync
cd dir-sync
composer install --optimize-autoloader
Write your configuration to app/config/parameters.yml
app.name: app
app.master.storage: local
app.master.path: /master
app.master.filters:
path:
pattern: '~[a-z]\.mp4~'
excludeEpisodes:
path: '/path/to/file.json'
app.slave.storage: local
app.slave.path: /slave
app.slave.path_tpl: /__program__/__uid__
app.slave.filters: null
app.logger: file
file.log.path: %kernel.logs_dir%/sync.log
composer test
Add new cronjob to run synchronization periodically
php bin/console sync:run
Default logs location – var/logs/sync.log