Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.32 KB

README.mediawiki

File metadata and controls

24 lines (20 loc) · 1.32 KB

Table of Contents

liveFolderSync

Does what it says on the tin. Keeps 2 servers in sync, master/slave style, in real time. As files are write-closed, moved, deleted or created that change is picked up by inotify and sync'd to your target server using rsync over ssh.

Install

The following instructions apply to Ubuntu, I've not tested elsewhere.

Auto Install

  1. Checkout the latest copy of liveFolderSync to somewhere on your server, eg /usr/local/liveFolderSync
  2. Run install.sh

Manual Install

  1. The watcher uses inotifywatch, which on Ubuntu is supplied by inotify-tools, so instal that via apt-get
  2. Checkout the latest copy of liveFolderSync to somewhere on your server, eg /usr/local/liveFolderSync
  3. Install the files using symlink to their various homes
    1. Symlink /usr/local/liveFolderSync to /usr/sbin/liveFolderSync
    2. Symlink /usr/local/defaults to /etc/defaults/liveFolderSync
    3. Symlink /usr/local/init to /etc/init.d/liveFolderSync
    4. Symlink /usr/local/etc to /etc/liveFolderSync

Configure and Start

  1. Configure your user, base path and destination server in /etc/defaults/liveFolderSync (Be sure the user you use has read permission on the basedir and has a shared SSH key between the servers)
  2. Start the daemon with /etc/init.d/liveFolderSync
  3. You can run `tail -f /var/log/daemon.log | grep liveFolderSync` to watch activity