インストール
yum install rsync
手動同期
mkdir rsync
cd rsync/
mkdir source
mkdir backup
touch source/test
rsync -av source/ backup
デーモン化
vi /etc/rsyncd.conf
rsync –daemon –config=/etc/rsyncd.conf
同期
touch source/test2
rsync -av source/ rsync://127.0.0.1/backup
lsyncdインストール、起動
yum install lsyncd
vi /etc/lsyncd.conf
lsyncd /etc/lsyncd.conf
同期
touch source/lsync
rsync version 3.0.6 protocol version 30
lsyncd
Version: 2.1.5
/etc/rsyncd.conf
### グローバル・オプション
uid = root
gid = root
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
### モジュール・オプション
[backup]
comment = rsyncd server
path = /home/nilesflow/rsync/backup
read only = no
/etc/lsyncd.conf
settings = {
logfile = “/var/log/lsyncd.log”,
statusFile = “/var/log/lsyncd.stat”,
statusInterval = 1,
}sync{
default.rsync,
source = “/home/nilesflow/rsync/source/”,
target = “127.0.0.1::backup”,
rsync = {
_extra = { “-a” },
}
}