| Synchronize Local Directories With a or Several Remote Machines |
|
|
|
| How To - Lsyncd | |
| Written by Christian Foronda | |
| Wednesday, 01 September 2010 13:40 | |
|
lsyncd is a program that uses rsync to synchronize local directories with a or several remote machine(s) running rsyncd. Lsyncd watches multiple directory trees through inotify. On startup it will rsync all directories with the remote host(s), and then sync single directories by collecting the inotify events. This tool is a lightx-weight live mirror solution. Install lsyncd on RHEL / CentOS Linux:
Sample usage: Watch and rsycn's the local directory /var/www/ with all subdirectories and transfers them to 'remotehost' using the rsync-share 'wwwshare'.
Rsync/watch '/var/www', but it excludes files and directories from '/etc/lsycnd/exclude'. Additionally this example lsyncd will not fork, and log to stdout/stderr instead.
This special target will scan through all directories in /home and syncs all www subdirectories of the users to wwwshare in the subdirectory foobar. The user peter having his local data in /home/peter/www/ will have it rsynced to ::wwwshare/foobar/peter/.
Limitations: Reference: Similar articles
|
|
| Last Updated on Wednesday, 01 September 2010 13:46 |


