ude:~# apt-get update : : ude:~# apt-get install rsync Reading Package Lists... Done Building Dependency Tree... Done Suggested packages: ssh The following NEW packages will be installed: rsync 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 208kB of archives. After unpacking 434kB of additional disk space will be used. Get:1 http://ftp.jp.debian.org sarge/main rsync 2.6.4-6 [208kB] Fetched 208kB in 9s (21.5kB/s) Selecting previously deselected package rsync. (Reading database ... 7644 files and directories currently installed.) Unpacking rsync (from .../archives/rsync_2.6.4-6_arm.deb) ... Setting up rsync (2.6.4-6) ... rsync daemon not enabled in /etc/default/rsync ude:~#
ude:~# cat /etc/default/rsync # defaults file for rsync daemon mode # start rsync in daemon mode from init.d script? # only allowed values are "true", "false", and "inetd" # Use "inetd" if you want to start the rsyncd from inetd, # all this does is prevent the init.d script from printing a message # about not starting rsyncd (you still need to modify inetd's config yourself). RSYNC_ENABLE=false # which file should be used as the configuration file for rsync. # This file is used instead of the default /etc/rsyncd.conf # Warning: This option has no effect if the daemon is accessed # using a remote shell. When using a different file for # rsync you might want to symlink /etc/rsyncd.conf to # that file. # RSYNC_CONFIG_FILE= # what extra options to give rsync --daemon? # that excludes the --daemon; that's always done in the init.d script # Possibilities are: # --address=123.45.67.89 (bind to a specific IP address) # --port=8730 (bind to specified port; default 873) RSYNC_OPTS='' # Don't forget to create an appropriate config file, # else the daemon will not start. ude:~#RSYNC_ENABLE=inetd と書けばいいだけかと思ったら、 you still need to modify inetd's config yourself だと。
ude:/etc/init.d# cd ude:~# cd /etc/default/ ude:/etc/default# mv rsync rsync.orig ude:/etc/default# cp rsync.orig rsync ude:/etc/default# ls -l rsync* -rw-r--r-- 1 root root 1091 Jan 13 13:22 rsync -rw-r--r-- 1 root root 1091 May 11 2005 rsync.orig ude:/etc/default# vi rsync : : ude:/etc/default# diff rsync.orig rsync 8c8 < RSYNC_ENABLE=false --- > RSYNC_ENABLE=inetd ude:/etc/default#
ude:/etc# vi rsyncd.conf ude:/etc# cat rsyncd.conf [Backup] path = /mnt/Backup hosts allow = 192.168.1.0/24 ude:/etc#こんなもの?
ude:/etc/default# grep rsync /etc/services rsync 873/tcp rsync 873/udp ude:/etc/default#あるある。
ude:/etc/default# cd /etc/ ude:/etc# mv inetd.conf inetd.conf.orig ude:/etc# cp inetd.conf.orig inetd.conf ude:/etc# ls -l inetd.conf* -rw-r--r-- 1 root root 1337 Jan 13 13:28 inetd.conf -rw-r--r-- 1 root root 1337 Jan 8 13:56 inetd.conf.orig ude:/etc# vi inetd.conf : : ude:/etc# diff -c inetd.conf.orig inetd.conf *** inetd.conf.orig Mon Jan 8 13:56:42 2007 --- inetd.conf Sat Jan 13 13:29:26 2007 *************** *** 42,45 **** #:HAM-RADIO: amateur-radio services #:OTHER: Other services ! --- 42,45 ---- #:HAM-RADIO: amateur-radio services #:OTHER: Other services ! rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon ude:/etc#
ude:~# /etc/init.d/inetd reload Reloading internet superserver: inetd. ude:~#これで LS-GL 側の設定は終わり。
[root@red /root]# cd /mnt/home/Backup/ [root@red Backup]# rsync -rtuvpogtlH rsync://ude/Backup/ude . receiving file list ... done ude/ ude/ude.0701/ : ude/ude.0701/ude-yamasita.Thu.tar.gz wrote 522 bytes read 110972283 bytes 4351874.71 bytes/sec total size is 110956653 speedup is 1.00 [root@red Backup]#
← LS-GL: debian: バックアップ |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GL: debian: DHCP サーバ |