Skip to content

Instantly share code, notes, and snippets.

@tureki
Created March 12, 2014 11:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tureki/9505457 to your computer and use it in GitHub Desktop.
Save tureki/9505457 to your computer and use it in GitHub Desktop.
AWS EC2 lsyncd install and basic rsync setting
----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync, but executing moves through on the target.
--
-- For more examples, see /usr/share/doc/lsyncd*/examples/
--
-- sync{default.rsyncssh, source="/var/www/html", host="localhost", targetdir="/tmp/htmlcopy/"}
settings {
logfile = "/tmp/lsyncd.log",
statusFile = "/tmp/lsyncd.status",
--nodaemon = true,
statusInterval = 1,
maxProcesses = 1,
maxDelays = 2
}
sync{
default.rsync,
delay=10,
source="/home/tureki/web",
target="/home/tureki/web-sync",
rsync = {
binary = "/usr/bin/rsync",
archive = true,
compress = true,
}
}
#! /bin/sh
yum install -y rsync
#AWS Enable Epel repo.
yum install -y lsyncd --enablerepo=epel
service lsyncd start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment