Debian 安裝 rsync Server

# apt install rsync
# nano /etc/rsyncd.conf

------------------------------------------------------------------------------------# sample rsyncd.conf configuration file

# GLOBAL OPTIONS

#motd file=/etc/motd
log file=/var/log/rsyncd.log
# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
# The init.d script does its own pid file handling,
# so omit the "pid file" line completely in that case.
pid file=/var/run/rsyncd.pid
#syslog facility=daemon
#socket options=

# MODULE OPTIONS

[myrsync]

comment = public archive
path = /myrsync
use chroot = yes
# max connections=10
lock file = /var/lock/rsyncd
# the default for read only is yes...
read only = no
list = yes
uid = nobody
gid = nogroup
# exclude =
# exclude from =
# include =
# include from =
auth users =admin
secrets file = /etc/rsyncd.secrets
strict modes = yes
# hosts allow =
# hosts deny =
ignore errors = yes
ignore nonreadable = yes
transfer logging = yes
# log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.
timeout = 600
refuse options = checksum dry-run
dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz
--------------------------------------------------------------
# nano /etc/rsyncd.secrets
# nano /etc/default/rsync
#chown root:root /etc/rsyncd.secrets
#chmod 600 /etc/rsyncd.secrets
#/etc/init.d/rsync start


在Linux client 到 Rsync Server:
rsync -avzrHS --delete /sftpserver/uploadrsync/ hotai@s2.ice.com.tw::uploadrsync

發佈留言