BTSync – Your own 1TB cloud backup, for £85

In this day and age then content is a valuable thing, for me its the pictures of the children, source code archives, important documents and as I’ve learned to my cost in the past then backing it up is the key, not only backups at home but backups in remote locations. Recently I’ve been using BTSync instead of Dropbox to sync between PCs, Laptops, iPads, and iPhones its a brilliant App/Service, private, secure (so far) and all in your own control.

btsync

 I really cant speak highly enough of it, even though it’s still in Beta. It took some while to dawn on me that it would make a great remote backup service. All it would need is a Raspberry Pi, WiFi USB Dongle and a 1TB USB drive:

You don’t have to buy from Amazon, my Pi kit came from RS, the dongle from eBay (£3), however my dongle gave me loads of trouble as it wasn’t recognised by the Pi, took a bit of messing to make it recognised. The cool thing about this setup is it will all work off the single Pi power supply, just the wall-wart. Its small enough and runs cool enough to be tucked into the bottom of a cupboard.

PiBackup

Once you’ve got your Pi then install the standard raspbian distribution, download and unpack btsync and set it up to run on boot. Copy the btsync binaryfile into /usr/local/bin and drop this script into /etc/init.d/btsync:

#! /bin/sh
# /etc/init.d/noip### BEGIN INIT INFO
# Provides: noip
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start/stop BTSync
# Description: A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.
### END INIT INFO# If you want a command to always run, put it here# Carry out specific functions when asked to by the system
case “$1” in
start)
echo “Starting BTSync”
# run application you want to start
/usr/local/bin/btsync –config /etc/btsync.conf
;;
stop)
echo “Stopping BTSync”
# kill application you want to stop
killall btsync
;;
*)
echo “Usage: /etc/init.d/btsync {start|stop}”
exit 1
;;
esacexit 0

Then run “sudo update-rc.d btsync”, now you need to make a config file if you want to change any of the defaults, there are docs on the bittorrent site that describe the format and you can dump out an example config from the app itself on the command line. Once you’ve got that sorted then start btsync with “sudo /etc/init.d/btsync start”.  Find out the address of your pi and connect to the webinterface on port 8888.

Plug in your drive and set it up, there are many guides to doing this so I’ll not explain it here. You’ll also need to run another instance of BTSync on the machine you are trying to back up, create a share on there and then get the read-only sharing key and enter

Once you’ve got it all setup and running you can then move it to a remote location (grandmas house) and away you go, remote backup. I’ve also used luks to encrypt the main drive and setup an ssh shell with public/private keys so I can maintain the little beast remotely: