Tag Archives: linux

Automated SCP Copy Script (with Wake-On-LAN)

As some of you may know currently I have a file server and a download server. The file server has a script that checks if anyone is connected if not , it goes to sleep. It can be waken via Wake-on-Lan. This is to reduce power consumption , as due to electricity tariffs which are going up in 2014 (that is in Malaysia). My File Server consumes about 60-70W of energy when it is idling. When it is asleep it only consumes about 2W 

server-to-server

My Torrent Server on the other hand consumes about 20W (It’s a little machine that runs on Intel Atom 330) and has a 80GB of Storage. Basically I use it to download things from Deluge.

The problem is that once the file has been downloaded , I would have to move the files manually from my torrent server to my file server . It’s painful – I’ve to ssh over , scp and rm the files once it is done. It is becoming more and more troublesome when you have a large files to copy over – especially downloading movies

ssh [email protected]
cd /downloads/
scp -r file [email protected]:/largeHD/media/
rm file

This is what i generally do . What’s worst is that if my file server is sleeping , I would have to issue a wake on lan command to activate it. Also I’ll have to change the destination every time based on the type of file , as i’ve my file server organised !

Continue reading Automated SCP Copy Script (with Wake-On-LAN)

Samba Wake On Demand Script

Recently , I purchased a raspberry pi and I have to say that it is an amazing device. It now functions as my 24/7 server, however I have already a file server whereby I use to keep important files (such as family vacation photos , important documents , backup of my phone contacts and my save game files if any). The problem was leaving the server 24/7 as it draws about 60W (idle) as opposed to the pi which is about 5W. Of course this could solved by putting the server to sleep and waking it up with a Wake On Lan tool. It’s great if it was me that want to access the shared folder , but how about my less tech savvy family-members

Continue reading Samba Wake On Demand Script