root@wl ~/src # wget http://samba.anu.edu.au/ftp/rsync/src/rsync-3.0.8.tar.gz
root@wl ~/src # tar xvfz rsync-3.0.8.tar.gz
root@wl ~/src # cd rsync-3.0.8
root@wl ~/src/rsync-3.0.8 # ./configure
...
rsync 3.0.8 configuration successful
root@wl ~/src/rsync-3.0.8 # make
root@wl ~/src/rsync-3.0.8 # make install
root@wldev ~ # vi /etc/rsyncd.conf log file = /var/log/rsyncd.log [wldev_wwwroot] path = /export/home/dev/wwwroot comment = DEV Root Sync uid = root gid = root use chroot = yes read only = yes list = yes hosts allow = wl max connections = 10 timeout = 300 hosts allow = 192.168.0.0/24 auth users = windy secrets file = /etc/rsyncd.scrt root@wldev ~ # vi /etc/rsyncd.scrt windy:12345 root@wldev ~ # chmod 600 /etc/rsyncd.scrt root@wldev ~ # rsync --daemon
root@wl ~ # rsync rsync://windy@wldev/ wldev_wwwroot DEV Root Sync root@wl ~ # rsync rsync://windy@wldev/wldev_wwwroot Password: drwxr-xr-x 3 2010/11/18 16:44:45 . -rw-r--r-- 17 2010/11/18 16:44:45 test.php root@wl ~ # rsync -avz rsync://windy@wldev/wldev_wwwroot /export/home/webmast/wwwroot Password: receiving incremental file list ./ test.php sent 86 bytes received 171 bytes 171.33 bytes/sec total size is 17 speedup is 0.07반대로 파일을 보낼 수도 있다. 아래와 같이 하면 된다.
root@wl ~ # rsync -avz /export/home/webmast/wwwroot rsync://windy@wldev/wldev_wwwroot ...
root@wl ~ # rsync -avz -e ssh --rsync-path /usr/local/bin/rsync wldev:/export/home/dev/wwwroot/ /export/home/webmast/wwwroot 암호: [ssh의 암호] receiving incremental file list ./ test.php sent 33 bytes received 108 bytes 40.29 bytes/sec total size is 17 speedup is 0.12
|
|
Copyright © 2004-2012 Jo HoSeok. All rights reserved. |