rsync 设置

客户端(待备份):
配置/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控制其执行时间
posted @ 2012-06-22 20:37  feiling  阅读(152)  评论(0编辑  收藏  举报