Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

74 lines (46 sloc) 2.2 KB


A continuous rsync runner to keep local and remote directories in sync. It watches the source directory tree for any changes, and immediately invokes the specified rsync command.


$ npm install -g rsyncer


rsyncer comes with an executable nsyncer(1) that you will use to sync and/or watch your directories/files

$ nsyncer start ./config.json


command line nsyncer(1)


  • start - Start rsyncer
    • accepts a file path argument to a config file


  • -s, --single - Run rsync once, and exit
  • -e, --errexit - Abort script on rsync error
  • -t, --test - Print the rsync command(s) and exit


$ nsyncer start ./config.json --single
nsyncer: watch: /Users/jwerle/repos/node-rsyncer/tmp/src/ (watching:true)
nsyncer: sync complete


Accepts a configuration object

  • paths - An array of objects, each with the following properties:
    • src - The source file or directory to watch.
    • dst - The destination file or directory to write to.
    • disabled - (optional) A boolean to indicate if this job should be ignored (Default false).
  • args - (optional) An array of string arguments, that will be passed directly to rsync. These will be the default set of args passed to all paths that do not have args defined. If args is defined on both the path, and the top level, only the path's args will be used.

  • recursive - A boolean whether to recursively sync paths. (Default: false)

  • delete - A boolean whether delete extraneous files from destination dirs. (Default false)
  • cvsExclude - A boolean whether auto-ignore files the same way CVS does. (Default: false)
  • links - A boolean whether copy symlinks as symlinks (Default: false)

  • once - A boolean indicating whether to run the rsync command only once. (Default: false)

  • test - Print the rsync command(s) that would be executed and exit. (Default: false)

An example configuration file: config.example.json




Jump to Line
Something went wrong with that request. Please try again.