/prisync

Pseudo-realtime file synchronization daemon

Primary LanguageRuby

prisync is a pseudo-realtime file synchronization daemon. It uses rsync utility in background
to transfer changes and inotify kernel events to monitor changes - thus it can be run only
on Linux with inotify-capable kernel. Can be used to keep two local folders or (usually)
to keep files on two servers in sync.

Usage: ssync [options]
    -p, --local-path PATH            Local path to synchronize and monitor for changes,
                                     defaults to current directory if omitted
    -r, --target-path PATH           Target (remote) path to sync with. If you want to sync with
                                     a remote host it should be given as user@host:/remote/path/
        --ssh-port [PORT]            SSH port to use if you want to sync with remote host via SSH tunnel,
                                     you HAVE to specify remote host in the target-path option
    -t, --timeout [SECONDS]          Time to wait for any new changes to arrive before
                                     starting the actual synchronization, use to not trigger
                                     multiple synchronizations for repetitive event sources like
                                     file uploading, default value is 5 seconds
    -x, --exclude [REGEXP]           Exclusion mask, should be specified as a valid Regexp. Items
                                     matching this regexp will be excluded from monitoring and will not
                                     trigger synchronization but will still be synced by rsync
    -s, --sync-on-start              Triggers initial synchronization on start
    -v, --verbose                    Run verbosely with debug output
        --dry                        Only print the rsync command without actually executing it
    -h, --help                       Show help