環境:
192.168.172.131服務端
192.168.172.133客戶端
服務端:
1 yum -y install rsync
2 mkdir /root/abc
cd /root/abc
touch aaa
3 vim /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = yes
address = 192.168.172.131
port 873
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
hosts allow = 192.168.172.0/24
[wwwroot]
path = /root/abc
comment = Document Root of www.51xit.top
read only =no
dont comperss = *.gz *.bz2 *.tgz *.zip *.rar *.z
auth users =backuper
secrets file = /etc/rsyncd_users.db
4 cat /etc/rsyncd_users.db
backuper:pwd123
chmod 600 /etc/rsyncd_users.db
systemctl stop firewalld
5 rsync --daemon
netstat -anpt |grep rsync
tcp 0 0 192.168.172.131:873 0.0.0.0:* LISTEN 12173/rsync
客戶端
yum -y install rsync
systemctl stop firewalld
mkdir /root/abc
chmod 777 /root/abc
vi /etc/server.pass

chmod 600 /etc/server.pass
rsync -az --password-file=/etc/server.pass backuper@192.168.172.131::wwwroot /root/abc
cd abc/
ll

crontab -e

到這里就結束了
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/196351.html
標籤:java
上一篇:高可用負載均衡(hproxy)
下一篇:Redis的持久化策略
