tar zxvf rsync-2.6.8.tar.gz
cd rsync-2.6.8
./configure && make && make install
vi /etc/rsyncd.conf
strict modes= yes
port= 873
logfile= /var/log/rsyncd.log
pidfile= /var/run/
lock file= /var/run/rsync.lock
max connections= 4
secrets file= /etc/rsyncd.share

uid= root
gid= root
path= /data
read only= no
list= yes
host allow= *
auth users= tianzy
vi /etc/rsyncd.share
start in the background
rsync --daemon --config=/etc/rsyncd.conf &
client configuration
vi /etc/rsyncd.share
client sync command
rsync -vzrtopg --progress --password-file=/etc/rsyncd.share tianzy@ /app_bak/bakdir/
--progress   show progress during transfer
--password-file=FILE   read password from FILE
--delete   delete files that don't exist on the sending side
-v,  --verbose increase verbosity
-o,  --owner preserve owner (super-user only)
-g,  --group preserve group
-t,   --times preserve times
-z,   --compress compress file data during the transfer
-p,  --perms preserve permissions
client crontab
crontab -e

  0 2 */1 * * rsync -vzrtopg --progress --password-file=/etc/rsyncd.share tianzy@ /app_bak/bakdir/