Created
March 12, 2014 11:55
-
-
Save tureki/9505457 to your computer and use it in GitHub Desktop.
AWS EC2 lsyncd install and basic rsync setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- | |
-- 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, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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