2025年 4月5日(土) 07:02 JST

rsync忘れがちなのでメモ

  • 2011年 5月19日(木) 15:01 JST
  • 投稿者:
  • 表示回数 163

 rsyncdの例 ml115

同期をとる場合の例

sudo rsync -auvz ml115::mydata
sudo rsync -avz ml115::mydata /home/mydata

参考にしたURL

/etc/rsyncd.conf
# sample rsyncd.conf configuration file

# GLOBAL OPTIONS

#motd file=/etc/motd
log file=/var/log/rsyncd
# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
# pid file=/var/run/rsyncd.pid
#syslog facility=daemon
#socket options=

# MODULE OPTIONS

[mydata]

path = /home/mydata
use chroot = yes
# max connections=10
lock file = /var/lock/rsyncd
# the default for read only is yes...
read only = yes
list = yes
uid = root
gid = root
# exclude =
# exclude from =
# include =
# include from =
# auth users =
# secrets file = /etc/rsyncd.secrets
strict modes = yes
# hosts allow = 172.20.0.128/25
# hosts deny = *
ignore errors = no
ignore nonreadable = yes
transfer logging = no
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 *.avi *.mpg *.mpeg *.wmv