Debian 安装 rsync
#直接执行
apt-get install rsync
#若出现错误提示
#Package 'rsync' has no installation candidate
#执行
apt-get update
apt-get upgrade
#再次执行
apt-get install rsync
Centos
yum install rsync
主服务器 A
迁移至服务器 B
A 和 B 均安装 rsync
以下在 A 服务器配置:
rsync 服务端安装完成之后是没有生成rsync.conf文件的,需要手动创建rsyncd.conf
vim /etc/rsyncd.conf
按照需求填入以下内容
log file = /var/log/rsyncd.log
pidfile = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
secrets file = /etc/rsyncd.secrets
hosts allow = B 的 IP
[wwwroot]
path = /www/wwwroot
comment = sync etc from server
uid = root
gid = root
port = 873
ignore errors
use chroot = no
read only = yes
list = no
dont comperss = *.gz *.bz2 *.tgz *.zip *.rar *.z
max