p4u's blog

plug&hack

Blog Index | Brushstrokes about me


My backup solution

Having a backup of my local data (photos, keys, documents, etc.) is something mandatory for me. Loosing it would be a really, really big mess and literally a huge part of my life would be gone.

A first easy solution would be to keep my data in an external hard drive, but it is not enough because usually my computer and the drive are in the same physical locaion (my house). So if something would happend to it, for instance a fire, I would loose everything anyway.

So I need to store it somewhere else, the best place seems to be the Internet cloud. But how to do that? How can I save more than 200Gb in the cloud without paying too much and, even more important, without giving all my personal data to some external company? These are the list of requirements I initially got:

  1. It must cost no more than 5€/month
  2. It must allow remote encryption
  3. It must be possible to save the data from several devices (laptop, tablet, phone, etc.)
  4. It must be reliable
  5. It must be automatic and not so painful for my computers

After having a look on several backup/storage providers (such as Amazon or Dropbox) I found the one which accomplish most of the points: CrashPlan. It offers unlimited remote storage trough a software application made with Java which is compatible with Linux, Android and more. In addition it allows remote encryption by using a RSA key.

The price is quite interesting: $5 per device. However I don’t want to pay more than this for all my devices, what can I do? SyncThing is the answer:

Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it’s transmitted over the Internet

So I can use syncthing to syncronie all the data from my several devices in a single point (a raspberry PI with an external hard drive). Then having a single instance of CrashPlan (thus buying a single license) I can upload everything to the cloud. So I will have the backup stored locally in my raspberry and also in the cloud. My house can burn now and my data will still be secure!

In addition to CrashPlan and SyncThing I don’t want to store all my private data into a non secure hard drive (someone could stole it!). So I configured my backup device (RasPi) to use double encryption: in the external hard drive and also in the RasPi user’s home.

The key to decrypt the hard drive is stored in the user’s home, which is only decrypted after an initial login trough SSH. So every time the backup device is rebooted (it should not happen so often) I need to login once via SSH to decrypt the home and (this happens automatically in my setup) decrypt the hard drive. After that, syncthing and crashplan start working and all my devices are safely backup.

The list of links which helped my to configure the Raspberry Pi:

  1. How to encrypt an external hard drive using LuKs
  2. How to encrypt your home directory using ecryptfs
  3. How to install crashplan into an ARM RasPi

Do not hesitate and backup your data or one day it will be too late!

Written on June 16, 2015