您好,登錄后才能下訂單哦!
lsyncd 是基于lua封裝的inotify + rsync
yum install -y gcc gcc-c++ make camke lua lua-devel
git clone https://github.com/axkibe/lsyncd.git
cmake .
make
sudo make install
settings {
logfile = "/var/log/lsyncd.log",
statusFile = "/var/log/lsyncd-status.log",
statusInterval = 20
}
sync {
default.rsyncssh,
source="/srcdir",
host="remotehost",
exclude = { '*.bak' , '*.tmp' },
excludeFrom="/etc/lsyncd.exclude",
targetdir="/dstdir",
rsync = {
archive = true,
compress = false,
whole_file = false
},
ssh = {
port = 1234
}
}
lsyncd -rsync /home/USER/src /home/USER/dst
lsyncd -rsync /home/USER/src remotehost:dst
lsyncd -rsync /home/USER/src remotehost1:dst -rsync /home/USER/src remotehost2:dst
lsyncd -rsyncssh /home/USER/src REMOTEHOST TARGETDIR
lsyncd -nodaemon CONFIGFILE
lsyncd -log all CONFIGFILE
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。