tswxl:~# apt-get install rsync Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: openssh-client openssh-server The following NEW packages will be installed: rsync 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 340kB of archives. After this operation, 672kB of additional disk space will be used. Get:1 http://ftp.jp.debian.org lenny/main rsync 3.0.3-2 [340kB] Fetched 340kB in 0s (497kB/s) Selecting previously deselected package rsync. (Reading database ... 9793 files and directories currently installed.) Unpacking rsync (from .../rsync_3.0.3-2_armel.deb) ... Processing triggers for man-db ... Setting up rsync (3.0.3-2) ... !tswxl:~#
tswxl:~# cd /etc
tswxl:/etc# mv inetd.conf{,.orig}
tswxl:/etc# cp inetd.conf{.orig,}
tswxl:/etc# echo 'rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon' >> inetd.conf
tswxl:/etc# tail !$
tail inetd.conf
#:BOOT: TFTP service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#:RPC: RPC based services
#:HAM-RADIO: amateur-radio services
#:OTHER: Other services
rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon
tswxl:/etc# kill -HUP `cat /var/run/inetd.pid `
tswxl:/etc#
tswxl:/etc# ls /etc/rsync*
ls: cannot access /etc/rsync*: No such file or directory
tswxl:/etc# cat > rsyncd.conf
[Backup]
path = /mnt/Backup
hosts allow = 192.168.2.0/24
tswxl:/etc#
[root@link sbin]# cat !$
cat Backup.to.link
#! /bin/sh
LOCKFILE=/tmp/`basename $0`
if [ -f $LOCKFILE ]
then
echo $0 already running
exit
fi
touch $LOCKFILE
#-------------------------------------
cd /mnt
for SRCHOST in giga sil mt ns ude tswxl
do
echo
echo $SRCHOST
echo
su yasunari -c "nice rsync -rtuvpogtlH rsync://$SRCHOST/Backup Backup"
done
#-------------------------------------
rm -f $LOCKFILE
#-------------------------------------
# AVR
echo -n "EEEE" > /dev/ttyS1
/sbin/shutdown -h now
[root@link sbin]#
[root@link sbin]# /bin/sh /usr/local/sbin/Backup.to.link : : tswxl receiving file list ... done ./ tswxl/ tswxl/tswxl.1005/ tswxl/tswxl.1005/tswxl-bin.Fri.tar.gz tswxl/tswxl.1005/tswxl-boot.Fri.tar.gz tswxl/tswxl.1005/tswxl-dev.Fri.tar.gz tswxl/tswxl.1005/tswxl-etc.Fri.tar.gz tswxl/tswxl.1005/tswxl-home.Fri.tar.gz tswxl/tswxl.1005/tswxl-initrd.Fri.tar.gz tswxl/tswxl.1005/tswxl-lib.Fri.tar.gz tswxl/tswxl.1005/tswxl-media.Fri.tar.gz tswxl/tswxl.1005/tswxl-opt.Fri.tar.gz tswxl/tswxl.1005/tswxl-root.Fri.tar.gz tswxl/tswxl.1005/tswxl-sbin.Fri.tar.gz tswxl/tswxl.1005/tswxl-selinux.Fri.tar.gz tswxl/tswxl.1005/tswxl-srv.Fri.tar.gz tswxl/tswxl.1005/tswxl-sys.Fri.tar.gz tswxl/tswxl.1005/tswxl-usr.Fri.tar.gz tswxl/tswxl.1005/tswxl-var.Fri.tar.gz sent 351 bytes received 447869780 bytes 3568686.30 bytes/sec total size is 447813929 speedup is 1.00 : :
|
|
← telnet のインストール |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ メールのセットアップ |