ローカルディスクにバックアップを取っても、
ディスクがクラッシュしてしまうともともこもない。
我が家では rsync を用いて全 LinkStation のバックアップを
赤いLinkStationに置いている。
以下、基本的には LS-GL と同じ。
sil:~# apt-get install rsync Reading package lists... Done Building dependency tree... 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 267kB of archives. After unpacking 520kB of additional disk space will be used. Get:1 http://ftp2.jp.debian.org etch/main rsync 2.6.9-2 [267kB] Fetched 267kB in 1s (257kB/s) Selecting previously deselected package rsync. (Reading database ... 10339 files and directories currently installed.) Unpacking rsync (from .../archives/rsync_2.6.9-2_arm.deb) ... Setting up rsync (2.6.9-2) ... rsync daemon not enabled in /etc/default/rsync, not starting... sil:~#
sil:~# cd /etc/default/ sil:/etc/default# mv rsync rsync.orig sil:/etc/default# cp rsync.orig rsync sil:/etc/default# ls -l rsync* -rw-r--r-- 1 root root 1352 Jul 14 18:13 rsync -rw-r--r-- 1 root root 1352 Nov 21 2006 rsync.orig sil:/etc/default# vi rsync : : sil:/etc/default# diff -c rsync.orig rsync *** rsync.orig Tue Nov 21 01:27:02 2006 --- rsync Sat Jul 14 18:14:22 2007 *************** *** 5,11 **** # 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 --- 5,11 ---- # 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=inetd # which file should be used as the configuration file for rsync. # This file is used instead of the default /etc/rsyncd.conf sil:/etc/default#
sil:/etc/default# cd .. sil:/etc# vi rsyncd.conf : : sil:/etc# cat rsyncd.conf [Backup] path = /mnt/Backup hosts allow = 192.168.1.0/24 sil:/etc#
sil:/etc# grep rsync /etc/services rsync 873/tcp rsync 873/udp sil:/etc#OK.
sil:/etc# mv inetd.conf inetd.conf.orig sil:/etc# cp inetd.conf.orig inetd.conf sil:/etc# ls -l inetd.conf* -rw-r--r-- 1 root root 1410 Jul 14 18:18 inetd.conf -rw-r--r-- 1 root root 1410 Jul 1 17:15 inetd.conf.orig sil:/etc# vi inetd.conf : : sil:/etc# diff -c inetd.conf.orig inetd.conf *** inetd.conf.orig Sun Jul 1 17:15:55 2007 --- inetd.conf Sat Jul 14 18:19:19 2007 *************** *** 43,46 **** --- 43,47 ---- #:OTHER: Other services ## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd + rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon sil:/etc#
sil:/etc# kill -HUP `cat /var/run/inetd.pid ` sil:/etc#
[root@red sbin]# cd /mnt [root@red /mnt]# rsync -rtuvpogtlH rsync://sil/Backup Backup receiving file list ... done ./ sil/ sil/sil.0707/ sil/sil.0707/sil-bin.Sat.tar.gz sil/sil.0707/sil-boot.Sat.tar.gz sil/sil.0707/sil-buffalo.Sat.tar.gz sil/sil.0707/sil-dev.Sat.tar.gz sil/sil.0707/sil-etc.Sat.tar.gz sil/sil.0707/sil-home.Sat.tar.gz sil/sil.0707/sil-initrd.Sat.tar.gz sil/sil.0707/sil-lib.Sat.tar.gz sil/sil.0707/sil-media.Sat.tar.gz sil/sil.0707/sil-opt.Sat.tar.gz sil/sil.0707/sil-root.Sat.tar.gz sil/sil.0707/sil-sbin.Sat.tar.gz sil/sil.0707/sil-srv.Sat.tar.gz sil/sil.0707/sil-sys.Sat.tar.gz sil/sil.0707/sil-usr.Sat.tar.gz sil/sil.0707/sil-var.Sat.tar.gz sil/sil.0707/sil-yasunari.Sat.tar.gz wrote 358 bytes read 263898595 bytes 3968405.31 bytes/sec total size is 263865001 speedup is 1.00 [root@red /mnt]#OK
#! /bin/sh LOCKFILE=/tmp/`basename $0` if [ -f $LOCKFILE ] then echo $0 already running exit fi touch $LOCKFILE #------------------------------------- cd /mnt for SRCHOST in giga link sil #gawa do nice rsync -rtuvpogtlH rsync://$SRCHOST/Backup Backup done #------------------------------------- rm -f $LOCKFILE全 LinkStation といっても、バックアップ対象は3台だったりする ^_^;
|
← バックアップ |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GLシリーズ ファームウェア アップデータ Ver.1.11 |