Building a simple Offsite backup server with an EEEpc and Bittorrent Sync.

Some gadgets are just hard to throw out. Perhaps you keep hanging on to them because you have this plan of “using them someday” for “some project”. Perhaps you keep hanging on to them because of nostalgia. Whatever reason you might choose, those geeky gadgets that keep occupying that box in your office aren’t getting any younger. Why not put them to good use ?

Lets take 2 items in MY junk-box as an example. An aging Asus EEE 701 Netbook PC that I have been hanging onto because of sentimental reasons. (I smuggled it in from the US way before these babies were available in Belgium) Its keyboard is broken and its low specs when it comes to storage, memory and cpu power aren’t helping it in finding something useful to do these days. The second item is my first 1tb external hard drive. I haven’t thrown this one out because its on my ‘for-some-project-some-day’ list. Its been on the list for 2 years now … So lets smash them together and turn them into a Remote backup solution using open source software and Bittorrent technology.

1013636_10152730916287912_8486272877834744564_n

Step 1 : Turn the EEEpc into a headless server.

I downloaded the Image for Ubuntu’s ‘minimal installer’ off the net and have had it kicking around on an old USB stick for a while now. Because of its small footprint its ideal to do ‘light’ installations of Ubuntu because you can choose which components you want to install. I chose the ‘minimal Ubuntu server’ and the SSH server component. When the installation was complete I rebooted the laptop and hooked up the external USB drive (that I had formatted in one big FAT32 partition)

Step 2 : Install Webmin and mount the drive.

Because I was going to use my external hard drive to store my remote backups on (the EEEpc doesn’t have enough storage) I needed to be sure it was always mounted correctly if my little laptop should have to reboot. So instead of messing around with stuff like FStab config files I installed Webmin. (a Web-based interface to your Linux server). Using the ‘Disk and network file system’ menu I mounted the external drive into a folder called ‘backup drive’ that I had created in my home directory. This way I was sure that the external drive was always mounted correctly in the same folder.

Links : Howto install Webmin.

Step 3 : Install Bittorrent Sync.
Next up I installed a copy of Bittorrent Sync both on my local server and on the old eeePc. Following THIS tutorial lets you install Bittorrent Sync and configure the Web interface to be accessible from all over your network. (So make sure you choose a very secure administrator password). When installing Bittorrent sync this way, you are also sure the service always starts up when your computer reboots.

Links : Howto install Bittorrent sync. 

After the installation was complete I surfed to the Bittorrent web interface of my home server (source system) in one tab, and to that of my EEEpc (remote destination system) on another one.

Step 4 : Share a folder on your Source system.

Now it was pretty smooth sailing. On the Bittorrent web interface of my SOURCE machine I made a bittorrent share of each folder I wanted to backup remotely. I right clicked “properties” once the folder was created and copied the ‘READ ONLY’ secret.

Step 5 : Enter the key for the shared folder on your remote destination system.

Next up I went to the tab of my ‘remote destination system’ and entered the READ ONLY key. I selected a folder on my external drive where the files needed to be synced towards. (in my /home/backupdrive/ directory)

Step 6 : Do the initial copy

After repeating the process above for all the folders I wanted to ‘sync remotely’ I just had to wait for the initial copy to complete. After that it was time to pickup the EEEpc and the External drive and bring them to their new (remote) home. I hooked the EEEpc up to the network, started up the machine and … that was that … headless remote backup solution done.

Epilogue.

Because Bittorrent sync doesn’t care about open ports or anything I didn’t have to mess with the router on the remote end of my backup solution. There were no ports to forward and even a static IP was not required for the remote machine. Just connect it , fire it up and .. boom. Using the ‘read only’ secret is an insurance that changes to my files are only synced one way : From the source to the remote system (and never the other way around).

You can expand this setup (and increase the security at the remote end) by syncing over encrypted ZIP files. That way people can’t access the data should your system be compromised.

In the end its a great simple way to use an old system (you can even use an old laptop with a broken screen for this) and give it a new lease on life. The setup is simple, the interfaces are web based and the whole setup is perfect for a remote backup destination at your parents or in laws.

So secure your data and put those old clunkers back in action !

Related Posts

kw806 : Datacenter in a box.

We go deeply technical today and discover the wonders of Virtual machines. What are they and why do we compare them to holographic characters in Star Trek ? We talk about the secret sauce to build a ‘Datacenter in a Box’ for your home. Instead of owning rows of old clunkers to test, or half a server rack to meet your needs, we take a tour of Virtualbox and how you can use it to shove an entire datacenter… under your desk.

You can also watch the Live recording of this show on Youtube.

Shownotes.
– Virtual machines .. What are they.
– How can you use them to work for you.
– Working out your strategy.
– What I use ?
Virtualbox.
Virtualbox extention pack .
Vboxmanage commands.

Related Posts

Server Week: What is OSX Server and Why Would a Home User Need One ?

*By guestblogger Todd Oldhoff *

As someone who teaches about using OS X Server I get a lot of questions from home users about why they would even need a server in the first place. Most people perceive that servers are for big business operations. They are huge machines that sit in a dedicated room and are monitored by IT professionals who make sure everything is running smoothly and fix things when they break down. The whole process seems overwhelming and most feel they lack the expertise and spare room to even consider running a server. So why would a home user need to run it in the first place?

I want to start by saying this is a great question to ask and one that we should ask not only as it relates to servers but all of the software we use. If you don’t have a real need for an application you should just avoid it as it will only clutter up your hard drive and cost you money to purchase. Also, if at the end of this post you still don’t see the need for running a server than don’t do it. This article is designed to help you see what a server could do for you so you can truly determine whether the features fit any of your needs. So let’s get started with why you might want to run a server by looking at the hardware requirements.

One of the myths most people have about servers is they are huge machines that need dedicated rooms to run. The beauty of our current place in history is that servers can be run on very small hardware that won’t take up more than the size of a shoe box on your shelf depending on your needs. You can run OS X Server on a Mac Mini and have plenty of power for your home environment. In fact I would recommend using a Mini for home use because of the power benefits and it’s small size. I would however recommend getting at least 8GB of RAM and, if you can swing it, 16GB. With that you should be in great shape to run OS X Server. But server can also run on any Mac you have in the house so don’t feel like you have to purchase a new Mac to run server (unless of course your Mac is too old to run Mavericks). As long as you plan on leaving your server on and not move it around, you could even use a laptop.

Now that we have the hardware issue out of the way, let’s look at some of the benefits of running a server in a home environment. Each of these things should give you a good idea if Server is for you:

20100421_mac_os_x_server_default_homepage

 Wireless Time Machine Back Ups

If you don’t happen to have a Time Capsule or would rather have your storage space outside your router, you are out of luck when it comes to wireless Time Machine backups. Yes you could do some things to try to get it to work with an Airport Extreme Base Station with an attached drive but things could get corrupted and its not supported by Apple. With OS X Server you can designate any drive connected to your Mac Server to serve as a back up disk for Time Machine and the best part is that it is supported by Apple.

 Your Own VPN Service

With most of us spending a lot of time on unsecured public networks, fear of data being stolen over the air is a real concern. VPN creates an encrypted connection to the internet and protects what is sent and received over the air. OS X Server has a built in VPN service that you can use on all of your devices to make your remote web access secure.

Network Accounts

With most of us having multiple computers at home with multiple users wanting to access their stuff on those computers having the ability for any user to log into any computer on your network to access their files and desktop is a much needed service. With OS X Server you can create your own network accounts and host your user’s home folders on the server so they can access their own desktop and files on any Mac in the house. This really saves arguments over who gets what computer in the house. If you have kids you know what I mean!

 File Server

One of the first things most people think about when it comes to a server is gaining access to files when they are away from their main Mac and outside their network. With a server, you can designate any folders or drives as accessible outside your network and set who can access what files and folders.

 Manage Multiple Devices

Most homes have become mini corporate environments with multiple Macs and iOS devices. Managing all of those devices can be tedious and difficult to set up and maintain. With OS X Server you can manage all of your Macs and iOS Devices from a simple web interface and push changes over the air to your devices as groups or individual device profiles making managing devices a lot easier.

 Personal iCloud Service

For some people the idea of having all of their personal information online in the cloud somewhere makes them uneasy. What happens if a security breach happens with the service you are using? Instead of having those things on a hosted service, they may want to manage their own calendar, contact, iMessage and Mail Server. For those with kids this is a great way to help them get their feet wet in some of these services while you control what they can can’t see or do. Built into OS X Server are services to that allow you to manage these things and then sync your settings to all of your Apple devices.

 Personal Web Server

Built into OS X Server is a web server complete with a built in Wiki website that you can customize. You can also host your own websites with OS X Server though there are some challenges for home users depending on your ISP service and how they feel about home users hosting websites. But even with that limitation you could host an in-house only website that your family uses on your home network only to share things. Another great way to get the kids used to using a website and publishing to it in a safe environment.

 As you can see there are a lot of different uses for OS X Server for home users. If you saw anything in there that you could take advantage of, then OS X Server is for you. You don’t have to use every service to run server but can pick and choose what works best for you. For those of you that like step by step instructions on how to set all of this up, I have a Youtube Channel where I do just that. You can check out more information on my website or on my Youtube Channel. If you choose to get started and get stuck along the way feel free to send me an email or leave a comment.

 About Todd.

Todd Olthoff is a Mac enthusiast who loves to pass on what he has learned to others. He regularly produces screencast tutorials on his website and on his Youtube Channel. He is also a regular contributing screencaster for ScreenCastsOnline and for MacStadium a Mac colocation company.

 Links.

Related Posts

Google hacking week : Using Google to “Hack” stuff.

This week it’s ‘Google hacking week’ on Knightwise.com where we are going to show you some fun and interesting things you can do with Google. We sometimes forget that Google’s main mission is to “index the information of the world” and this means that the Google “bots” (little search and index programs) constantly crawl the internet in their never ending quest to gather information and index it in the massive Google database.

google_hack1

The end result is that if you type stuff into Google’s search bar like ” My Little Pownie ” it will cross reference your search with its massive database and bring back some results you can click on. Although searches like these make up 99% of what Google needs to do all day long .. its only the tip of the iceberg of what Google can REALLY do.

If you play your cards right and ask Google the right questions you can find out a whole lot more. And sometimes you will even find stuff that was not meant to be found. You would be amazed at what people throw online (and forget about). Google quietly indexes it all and you have just one thing to do … ask the right questions. 

This weeks articles have nothing to do with “Hacking Google” (good luck with that if you want to try) It’s more about realising the power of the biggest search engine in the world … and the blatant disregard for security that people can have when they put stuff online that was never supposed to be found. Stand by as we teach you some interesting Google Search ‘operators’ as they are called. 

We are going to kick you off with a nice examples of how you can use a modified Google search string to find some interesting stuff. Later on in the week we will explain the different google “operators” and how you can combine them to find cool stuff. 

Here is a very simple one to get you started : Copy and past the search query below into the google search box … and browse random peoples lives by peeking at their iPhone backups. This is not a hack. This is an indexation of information put online BY USERS, indexed by Google .. and found by you.

intitle:”index of” inurl:”iphone”

 

Related Posts

Carry ‘Switchblade’ and save any PC.

Live Cd’s are a blessing. Whenever you arrive at that family dinner and get shuffled into a stuffy corner to fix another dinky pc.. You KNOW you need help. Sure, there are plenty of live cd’s out there (The list in Distrowatch is quite endless) and each live CD has its own specific skills and thrills.  However not all of them are geared towards “fixing” a Windows PC.

Enter Switchblade, A 220 megabyte gift from whatever digital deity we pray to. The simple ‘push here to preform instant magic’ interface  to this “live application” that you can run from a Usb drive, will have you fix the most common quirks and aches any pc might suffer from.

With the ability to backup drivers, install Windows patches, Ccleaner or quicky find drivers online, Switchblade can save you enough time to make it back to the dinnertable for the main course. In combination with the Ninite installer and some handy automated command line commands ‘ chksdk c: /f /r ‘ and ‘defrag c: -f ‘ you will have the PC crunching numbers while you get to much down on potatoes and yams. 

Links : Switchblade 

Related Posts

From dapper to edgy in a snap.

When a new linux distribution hits the scene its always a little bit like Christmas. As the beta releases taunt you like packages beneath the tree, tempting you to try them out .. The hard part is sitting on your hands untill the website screams FINAL and the fun can begin. Thus here is my little christmas carol about how I updated my good old Ubuntu Linux 6.06 version to the latest in 6.10.

No beta's please.

Every new release of a linux distribution (in this case the new Ubuntu) puts the blender in the rumor pot.  What is new , what is going to change, this and that cool stuff is going to be new, are they gonna drop this and that. The only way to divide fact from fiction is downloading and installing the public beta versions that are released. Now I have never been one for beta's. And that is for two reasons. First of all because a beta never gives you a clear picture of what is going to be the final product. Sure, you might get a glimpse in the general direction, but the difference between the beta and the final release may be as dramatic as the difference between cookie dough and the finished brownie. Secondly : Beta's are mostly far from stable. Unless you are a developer or some genius programmer who can find and fix bugs in this PRE-released version of  a final distro, its not gonna do you much good. Forget using a public beta as a stable system. You are riding an unfinished car to the finish line. If you are masochistic and love to hog unpredictable kernels I would suggest turning to any version of Windows before its service pack one. 

Thus I bide my time till the final comes. And when my curiosity gets the best of my I'll just download the fucker and run it in a virtual machine.  

Why should we care to upgrade ?

Erm.. Good question. In the case of Ubuntu 6.06 it was out of sheer curiosity.

I (finally) got my current version to play nice with my home network, had it all eye-candied out so it looked smooth and more importantly, gotten used to the look-feel and possibilities of this worthy windows-replacing operating system.  Since it was a "decimal" upgrade (from 6.06 to 6.1) there was no rush. (When however they moved from 5. to 6. I was all over the place with joy). The other thing is, Linux distributions evolve differently from windows distributions. In mickey-software they whack in all  the cool toys and worry about security POST RELEASE. In Ubuntu they make sure the system is steam liner-stable and "Fort Knox secure" before they release it. All the "fancy smancies" are developed later by the community. So a Ubuntu distro can be considered "ripe for use" about two weeks after release when the command-line-geeks have had enough of caffeine driven all nighters and coded the crap out of themselves to prep the add-ons. 

But upgrade we shall ! (reinstall / upgrade)

Now, If I had absolutely nothing to do with my life, and installed/reinstalled my system every time there was a kernel fart, a re-installation was something to consider. Wiping ones hard drive clean and installing an OS from scratch is like wearing clean underwear or sleeping in fresh sheets.  But since I had my 6.06 running so smoothly the thought of upgrading crossed my mind. With windows I would never EVER Consider this , and even on my mac i like it better when i can erase/reinstall rather then upgrade. But I decided it was time to test the agility and maturity of Linux by going for the upgrade.. (and just maybe I'm a lazy fuck who did not want to wipe his porn ?) If you have the time go for a clean reinstall , If you don't want to wipe a working system, try the upgrade. You can always reinstall when it goes wrong.

Upgrading a working system.

I could tattoo the following advice into peoples forehead yet they would not listen to me until one day .. they loose everything. " BACKUP BACKUP BACKUP" what ever you do to a working system, make sure you backup everything before you begin. Don''t even try to come over and wine about all the crap you lost. I'll laugh in your face , step on your toe and write "I TOLD YOU SO' on your belly with pink lipstick. Afterwards you can run around naked in shame for all I care. I have no compassion for persistent stupidity. Next up : Be prepared for failure. Don't try elaborate shit like this if you need to get a paper out by next morning. Be prepared for total system fucky-uppie and start working on emergency response scenario's should your "kernel based acrobatics" fail.

The magic command line code

So lets get started. We have  " one cup of Ubuntu 6.06, with the important data and settings skimmed' Next up I found this great website that teaches you how to upgrade using just one line of code. Just pop open your command line window and type :

gksu "update-manager -c"

 

update

 

Next up enter your administrator password. The message will come up a new update is available and you need to click the 'update" button to do so. So what should you do ? … Hit it you twit !. The upgrade process will take quite some time so be prepared to actually spend time with your family and do what "normal' people do. Don't bite your nails awaiting the completion of this process.. Why  ? cause its not nice ! 

After about an hour the whole thing will be done, Reboot your system and say a prayer to "Sint Rita" who is the holy chaperone for lost causes. If Rita can't help you .. you are officially screwed.  

The magic word : Automatix !

If all went well you'll have a completely upgraded system. Otherwise enjoy your horrible " KERNEL PANIC" message heralding the end of your operating system as you have know it thus far. But you backed up all important data anyway .. didn't you ..  So now the trick is to make this fancy new version of Ubuntu into a working operating system. This means, being able to play *wmv files, play dvd's, be able to run Google earth and what have you . In short : All the good stuff. To do this there is the magical script of AUTOMATIX that will help you accomplish what takes geeks months, in mere minutes.  

If you had automatix installed on your old 6.06 system , lets remove it first shall we ? : Open a command line an type :

sudo apt-get remove automatix

enter your admin password and be gone with the old automatix.

Then we prepare to install AUTOMATIX2. So in our command line window we type : sudo gedit /etc/apt/sources.list

this will let you add the following line to the end your sources list ( where your linux gets his good stuff)

deb http://www.getautomatix.com/apt edgy main If you see any simular lines with a # in front of them, remove the # and save the file.

Now we enter some geeky lines in order to make automatix work. (hit ENTER after every line)

wget http://www.getautomatix.com/apt/key.gpg.asc
gpg –import key.gpg.asc
gpg –export –armor 521A9C7C | sudo apt-key add –

sudo apt-get update
sudo apt-get install automatix2 

If all went well you will now have a little AUTOMATIX icon in your
gnome menu ( APPLICATIONS / SYSTEM TOOLS / AUTOMATIX

And then some.

Now the good stuff can start. As you see , in automatix you can choose what good stuff to install , if I where you I would check every little tickbox and then get some more quality time with the family. The installation of programs like , skype , google earth , picasa and more might take some time. But when you are done all the stuff works fine and you are the proud owner of a fully working Ubuntu 6.10. Have fun.

Sources :

Automatix2 

Cup of Tech 

 

Related Posts