CentOS 服务器之间 rsync 增量备份

参考文件

http://linux.chinaunix.net/techdoc/net/2008/01/21/977133.shtml
http://www.2cto.com/os/201108/101075.html

源服务器 10.101.01.1 上进行配置工作

[root@localhost e]#vim /etc/rsyncd.conf

port=873
uid = nobody
gid = nobody
use chroot = no
max connections =0
pid file = /usr/rsync/rsyncd.pid
lock file = /usr/rsync/rsync.lock
log file = /usr/rsync/rsyncd.log
[bak]
path = /www
auth users = backup
ignore errors
secrets file = /usr/rsync/rsyncd.pass
read only =yes

设置密码

[root@localhost e]# cat /usr/rsync/rsyncd.pass
backup:123456

给予只读权限

[root@localhost e]# chown root:root /usr/rsync/rsyncd.pass
[root@localhost e]# chmod 600 /usr/rsync/rsyncd.pass
备份服务器上设置方法

[root@bakserver x]# cat /etc/rsyncd.passwd
123456

执行增量备份

[root@bakserver x]#rsync -avz --delete --progress --password-file=/etc/rsyncd.passwd [email protected]::bak /var/www/html/rsync


CentOS 服务器之间 rsync 增量备份_第1张图片




你可能感兴趣的:(工作,centos,服务器,File,Path)