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

Jan 04

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.

Jul 04


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 ?

Apr 02

*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.

Feb 24

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.

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.

Jan 12

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