文件服务器rsync
服务器配置
echo "cc:cc2023" > /etc/rsync.password
chmod 600 /etc/rsync.password
vi /etc/rsyncd.conf
uid = root
gid = root
use chroot = no
max connections = 40
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
exclude = lost+found/
transfer logging = yes
timeout = 900
ignore nonreadable = yes
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
auth users = cc
secrets file = /etc/rsync.password
[backup]
path = /data1/backup
comment = my backup dir
read only = false
运行
sudo systemctl start rsyncd
sudo firewall-cmd --list-all
rsync -avzP ./kylin10sp1-desktop-x64-template.qcow2 cc@10.31.66.80::backup
rsync -avzP ./newdir/ cc@10.31.66.80::backup