Linux System Administration

rsync can be used in many ways. This small utility got its name from Remote Synchronization words. However the word remote does no have to be a remote location over the network. rsync can be also used to synchronize your camera photos with your PC's hard drive. No fancy MS windows synchornizator tools which came with your camera are nedded. Here are simple steps how to sychronize:

first find you USB device name:

# fdisk -l
# mount your USB:
# mkdir /media/camera
# mount /dev/sdb1 /media/camera/

create local directory for your photos:

$ mkdir ~/photos

synchronize your photos:

$ rsync -av /media/camera/ ~/photos

All done. Next time when you make some new pictures just repeat the the following:

# fdisk -l
# mount /dev/sdb1 /media/camera/
$ rsync -av /media/camera/ ~/photos

at this point rsync will copy only new images. This is also good way to keep a backup of you images.

OPTIONS SUMMARY:

-a, --archive archive mode

-v, --verbose increase verbosity

If you own a Thecus 2100 NAS storage and you need to recover from some software accident you have two options. One is to use a USB serial connector or use telnet to stop booting sequence of Redboot loader. Here is how to do the second, easier option.

What you will need is:

  • PC or laptop with Ethernet card
  • your PC will preferably a running linux ( in my case I have Debian )
  • CAT5/6 Ethernet cable

Note:You need to have a Thecus Firmware version =< 2.1.05 . In my case I had 2.1.10 and it all worked perfectly.

To star first install iputils-arping and telnet packages on your PC / laptop:

# apt-get install iputils-arping telnet

Connect your PC with an Ethernet cable to your Thecus box to INTERFACE 1. Set your PC's ip address to 192.168.1.101. Let's assume that your PC's Ethernet card connected to Thecus 2100 is eth0:

# ifconfig eth0 192.168.1.101

Redboot sets its default IP address on Thecus 2100 to 192.168.1.100 so that is the reason we had set our PS's IP address on tha same subnet. All what needs to be done now is to execute a following command on your PC:

arping -f 192.168.1.100 && telnet 192.168.1.100 9000

Now just simply reboot or power on your Thecus N2100 and wait. Once you see a screen similar to the one below enter CTRL+C to abort execution of a boot script.

WARNING: interface is ignored: Operation not permitted
ARPING 192.168.1.100 from 192.168.1.101 eth0
Unicast reply from 192.168.1.100 [00:14:FD:30:16:4E]  11.605ms
Sent 16 probes (16 broadcast(s))
Received 1 response(s)
Trying 192.168.1.100...
Connected to 192.168.1.100.
Escape character is '^]'.
== Executing boot script in 2.920 seconds - enter ^C to abort
^C^C
RedBoot> 

I have installed a Debian on my N2100 yesterday and it is just great. I wonder why the Thecus guys do not put a full version of debian into this small box by default :-). Since this is a headless PC I was missing that last beep once the system booted so I would know when I can ssh to it. Here is a small hack to overcome this problem. First install a beep package:

# apt-get isntall beep
The open up a /etc/init.d/ssh file and scroll right to the bottom and replace:
exit 0

with:

beep -l 1000
exit 0

the -l option specifies a length of the beep so feel free to adjust it to your needs.

Page 63 of 73



Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top