- experimental 0.4.9~alpha-3
|sy-watch(1)||General Commands Manual||sy-watch(1)|
NAME¶sy-watch - monitor local Syncany folder and automatically sync changes
SYNOPSIS¶sy watch [-i | --interval=<sec>] [-s | --delay=<sec>] [-W | --no-watcher] [-a | --announce=<host>:<port>] [-N | --no-announcements] [<status-options> | <up-options> | <down-options>]
DESCRIPTION¶Automatically synchronizes the local folder with the repository. The command performs the up and down command in an interval, watches the file system for changes and subscribes to the Syncany pub/sub server.
In the default configuration (no options), the command subscribes to the Syncany pub/sub server and registers local file system watches in the locally synced folder (and all of its subfolders). When local events are registered, the command waits a few seconds (waiting for settlement) and then triggers the ´up´ command. After the upload has finished, a message is published to the pub/sub server, telling other clients of this repo that there is new data. Clients subscribed to the repository´s channel will receive this notification and immediately perform a ´down´ command. This mechanism allows instant synchronization among clients even if a dumb storage server (such as FTP) is used.
In case file system events or pub/sub notifications are missed, the periodic synchronization using the ´down´ and ´up´ command is implemented as a fallback.
Note: The messages exchanged through the pub/sub server do not include any confidential data. They only include the repository identifier (randomly generated in the ´init´ phase), and a client identifier (randomly generated on every restart).
In addition to these options, all arguments of the commands ´status´, ´ls-remote´, ´up´ and ´down´ can be used.