客户端(待备份):
配置/etc/rsyncd.conf
[root@linuxas3 root]# vi /etc/rsyncd.conf
uid=root
gid=root
max connections=4
use chroot=no
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsyncd.lock
#auth users=root
secrets file=/etc/rsyncd.pwd
[postfix]
path=/var/mail
comment = backup mail
ignore errors
read only = yes
list = no
auth users = postfix
[netkiller]
path=/home/netkiller/web
comment = backup 9812.net
ignore errors
read only = yes
list = no
auth users = netkiller
[pgsqldb]
path=/var/lib/pgsql
comment = backup postgresql database
ignore errors
read only = yes
list = no
rsync --daemon
echo "rsync --daemon" >> /etc/rc.d/rc.local
服务端(备份区):
rsync -avIR --delete--password-file=/etc/rsyncd.scrt name@ip::model 存放的文件
夹
编写存放在一个文件中,赋予其可执行权限,之后编辑/etc/crontab控制其执行时间