Rsync

来自MalacoKnowledge
imported>Malacology2022年5月30日 (一) 19:43的版本 (init)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

配置

# vim /etc/rsyncd.conf

写入

uid = nobody

gid = nobody port = 873 use chroot = no max connections = 4 syslog facility = local5 pid file = /run/rsyncd.pid


[sync]

 comment       = Welcome to BioArchLinux Sync!  
 path          = /usr/share/lilac/Repo
 list          = yes
 read noly	= yes
 timeout	= 6000
 ProtectSystem = off
 timeout	= 36000
 ignore nonreadable = yes
 dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz *.xs *.xz *.db *.zst 

启动

# systemctl enable rsyncd
  1. systemctl start rsyncd

防火墙

参见 ufw

# ufw allow 873/tcp

同步

rsync -rtlivH server_IP/domain::sync/ destdir