Skip to content
rsync-like clsync wrapper for live syncing (based on inotify)
C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
man/man1
GNUmakefile The first working version Jun 12, 2014
LICENSE Initial commit Jun 11, 2014
README.md
common.h Fixed rsync arguments Jun 12, 2014
configuration.h
error.c Removed "thread"-s from error.c Jun 12, 2014
error.h
lrsync.c Fixed building on "hippocrates" Aug 7, 2014
lrsync.h The first working version Jun 12, 2014
main.c Removed extra debug info Jun 12, 2014
malloc.c
malloc.h Initial commit Jun 12, 2014
popen.c
popen.h Initial commit Jun 12, 2014

README.md

lrsync

Contents

  1. Name

  2. Motivation

  3. How does that work

  4. Use cases

  5. Support

  6. Name


"lrsync" means "live rsync".

  1. Motivation

To make clsync more convenient and useful.

Well, honestly, this's quite useless utility because you can work with clsync directly :)

  1. How does that work

"lrsync" just parses arguments and sorts it for clsync and rsync (via clsync's "sync-handler-arguments"), after that it calls clsync this way: clsync -Klrsync -Mrsyncdirect -S path_to_rsync -W source_directory -D destination_directory -L /tmp/.lrsync clsync_arguments -- %RSYNC-ARGS% rsync_arguments. In this command clsync_arguments, rsync_arguments, source_directory and destination_directory are parsed from lrsync arguments.

You can see the result clsync command using option "--clsync-command-only". For example:

$ lrsync --exit-on-no-events --max-iterations=20 -av 1/ 2/ --clsync-command-only
clsync \
  -Klrsync \
  -Mrsyncdirect \
  -S \
  rsync \
  -W \
  1/ \
  -D \
  2/ \
  -L \
  /tmp/.lrsync \
  --exit-on-no-events \
  --max-iterations=20 \
  -- \
  %RSYNC-ARGS% \
  -av \
  1/ \
  2/ 
  1. Use cases

  1. This may be useful if you have a directory that is actively updated. And you want to move it somewhere. You can just call:

    lrsync --exit-hook /root/apacherestart.sh --exit-on-no-events --max-iterations 20 --inplace -av /usr/www/ /var/www/

  2. You want to get two directories in synchronous state:

    lrsync --delay-sync 3 --delay-collect 3 --delay-collect-bigfile 3 -av /home/dir1 /home/dir2

  3. Support


Write-to:

You can’t perform that action at this time.