If you are anything like me, you are online all the time, taking photos, downloading files, creating files, documents and random things, and generally generating loads of content. We can all recognise the need to protect this content from dropping off the face of the earth.

A work colleague of mine had her laptop hard drive crash on her unexpectedly some time ago. Nearly 50 days ago to be more precise. Her data recovery is still running. Getting lost files back is a major pain and people go to great lengths to prevent this from happening. Things have come a long way too. We started out way back with DATA tapes. They held massive amounts of data but were slow.  Then came personal CD Writers. I used to have  six 80 disk cd files in my drawer when I was a kid. I was obsessed with keeping my stuff safe. Yes it was mostly low quality series and music and occasional game too. But soon that wasn’t enough space. DVD storage became the groovy medium of choice. I replaced my cds with DVDs and for a while I was content.

Come round to the the age of the Internet, my family got an ADSL line and soon having enough safe storage was yet again an issue.

In the early days of online storage things were pretty bleak. Ad-riddled flash popup plagued storage sites. Slow downloads, worse uploads and the safety and integrity of your data was not guaranteed. And i’m sure we have all had the pleasure of doing the captcha/30second time out a few times.  This got better with time. Flash forward to present day and things are great.  We have some premium choices for online, safe and secure storage with desktop integration. Dropbox and Mega being two of the most exceptional examples. Even sites like the loathed Rapidshare have turned a corner in the quality of their storage offerings.

In this blog post I’m not going to show you how to sign up with one of these offerings. That is the easy way out. Simple yes, but then you wouldn’t learn anything.

Sticking with the BitTorrent theme I started in my last blog post, I will be walking you through creating your very own offsite syncing system capable of syncing anything you want, with iOS and Android compatibility to boot. You will be able to drop a file into a folder on your desktop machine then access it on your phone almost immediately. All for (mostly) free. And using the BitTorrent protocol. Snazzy!

First you will need a place to store your files. I recommend, since this is a Web Africa Blog after all, giving their entry level VPS a whirl. Its got just enough CPU power and storage space for your work files and photos. Later you can always upgrade if you need more space.

I ordered their Web Africa’s entry level VPS and asked for their Linux offering. I find Linux to be far more stable and easier on resources. You can pick windows but it is a bit slower and I wont be covering setup in that environment.

Once you have your VPS details, SSH into your Linux box. If you are running windows now is the time to download an application called Putty. It is an ssh tool. For those of you who don’t know what SSH is or how to use Putty check out this awesome link: http://www.gamexe.net/other/beginner-guide-ssh

Beware Web Africa use a non-standard ssh port so make sure you put in the correct ssh port you were given in your email when signing up.

Great, you are now connected to your brand spanking new Linux Machine. Take a moment to bask in its humble glory. . . . .

OK, enough dilly dallying. First off you will need to allow proper access to your Linux box from the outside world.

Copy and Paste the command in Bold Italics into your ssh session.

sudo iptables -I INPUT -j ACCEPT

You may be asked for a password. Enter the password for your Linux User. The one you used to ssh into the box.

Great, now you need to download the application you will run. Copy and Paste the following into your ssh session.

wget -O btsync.tar.gz http://download-lb.utorrent.com/endpoint/btsync/os/linux-glibc23-x64/track/stable

Next you need to extract the file. Paste the following.

tar xfv btsync.tar.gz

You will now have a new file extracted called btsync. Type ls and hit enter to see what files are in your current directory.

Next its time to make a directory to keep synced with. Paste the following.

mkdir sync

Great, now it’s time to run btsync. Type the following and hit enter.

./btsync

You should see something like:

BitTorrent Sync forked to background. pid = 48875

Fantastic. The hard part is over.  In your web browser enter in the IP address of your server followed with the port 8888/gui

Eg. 41.111.222.3:8888/gui

Welcome to the web interface. You will be asked to create an admin user. I suggest you use a strong password. The the web interface has too many features for the scope of this article but I will link you to the Manual for BitTorrent Sync. It’s pretty informative.

Lets run over the basics of what happens. You click Add Folder. Browse to the sync folder we created. It should be found in /home/{your username}/sync. Click the sync folder and click generate. The big jumble of Numbers and Letters is your super unique key linking that folder to other btsync clients. Make sure you keep it secret. Don’t write it down or save it on your pc. Copy it to your clipboard.

Grab BitTorrent Sync for windows and OSX from here: http://www.bittorrent.com/sync/downloads

Now when you set up Btsync on your home machine, you will be able to add a folder there too. When you add a folder, do not click generate, simply paste that magic key into the secret box, select a folder you want to keep synced and click add. Done. From now on, anything you put in that folder will be synced to your VPS server, and if you happen to add another machine into the mix, anything synced from that machine will appear on both of the other machines synced folders.

If you want to sync a new folder generate another key on which ever machine you want, and repeat the same steps with the new key. It’s that easy.

Now, when a machine crashes and you lose all your stuff, you can find it on all your other machines. If some time has passed and btsync is still somehow running on the affected machine, you may find your stuff is gone. It isn’t. If you look in the sync folder on one of your good machines there is a hidden folder names SyncArchive. This is where you can recover your lost data.

It is by no means perfect, but it’s a really neat way of keeping your important files on all your machines current while sticking it to the man and staying off the grid.

Please, if I have left anything important out, or you want some better explanations of something hit me up in the comments here.

In my next post, I will be showing you how to set up your own linux server at home, and possibly sneaking in the first part of ad-filtering using squid, a caching proxy program.

 

 

 

 

Comments are closed.