It can be hard to realize how important your personal data is until you lose it. Popular anecdote - that there are two types of people: those that do backups and those that will do backups - is in fact overly true. I want to share what makes me a fortunate member of the first group. I actually find my setup really safe. It consists of:
- Personal laptop computer (with 250 GB SSD)
- Synology 218j NAS (with two 3 TB WD Red HDDs)
- External USB hard drive case (with 2 TB WD Blue HDD)
- Amazon Glacier cloud service
Every security related consideration should start with a proper threat modeling. In this process we analyze the situation and identify possible risks. We define how probable they are, prioritize them and decide how much we want to cover. This allows us to design and apply proper countermeasures.
For me bad things that can happen to my personal data boil down to following two types of situations:
- Making my data inaccessible to me.
- Making my data accessible to wrong people.
I try to keep all my important data on my laptop. It has limited storage though, so I also keep an archive of older things on an external drive. And because physically connecting a device anytime I needed something from the archive was too cumbersome for me, the external drive lives in NAS device and is accessible in my home network.
So, what can go wrong?
Let me discuss it starting with the most probable scenarios.
Natural Perversity of Inanimate Objects
First and foremost, technology sometimes fail. Let it be silicon chip or magnetic disk, data that they store may become corrupted and unretrievable for myriad of reasons, from solar radiation to accidental coffee spills. Professional data recovery services cost much and give no guarantees. It’s much easier, faster and cheaper to replace the faulty element, restore from backup and move on.
In case my laptop’s drive fails I regularly make incremental backups of the data it stores to the external NAS drive. At the same time data stored in NAS is protected against technical malfunctions by using hard drives designed for this type of devices (with high durability) and complete redundancy provided by RAID 1 array (all the data is mirrored on two independent drives).
Challenges of Mobility
I travel with my laptop a lot. I commute with it when I need to give a lecture or workshop. I take it with me on a train or plane when I go to a conference. I leave it unattended in hotel rooms and other reasonably safe places. I take advantage of its mobility to a great extent.
It’s easy to imagine that I can just misplace it while on the run and leave it behind. It can be stolen from my bag when I lose sight of it for a moment. Somebody can sneak into my room in a hotel and steal it as well. A lot of ways it can be lost.
In terms of data recovery NAS waiting at home is of course enough. But it’s also a moment where preventing unauthorized people from accessing my private and sensitive data comes into play. To achieve that I use full disk encryption (FDE) on my laptop that requires a password on boot to allow access to the content.
Data Taken Hostage
Ransomware is malicious software that encrypts your data and demands ransom to provide the decryption key. This kind of malware has been around for a long time but recently became more popular among criminals due to the sense of anonymity provided by remunerations paid in crypto currencies.
Even the most tech savvy and careful computer users can get pwned by such attack and I consider myself being no exception. And you probably know the golden rule “don’t negotiate with terrorists”, which proper backups make a lot easier to apply. Wipe the whole encrypted content together with malicious code, restore from backup and move on.
But there’s one caveat to this: your backups must not be connected to the attacked system. Clever ransomware may attack data on my NAS as well and this copy will become equally unusable. This is why I regularly copy my incremental backups to the external USB hard drive which is connected to my computer only during this operation.
My Home Is Not a Castle
Break-ins happen. They are not that frequent but can’t be ruled out completely. In such a case it’s pretty likely that crooks will steal all electronic devices they can find, especially smaller ones like laptop or NAS.
This is yet another reason why I use FDE on my laptop and I have storage on NAS encrypted too. For the latter it means that after NAS boots up I need to login to the management console (with login and password) and mount directories (with their individual decryption keys) before accessing data via network. There’s no way to retrieve data even if someone takes the whole device with them. This also means that practically all data that I store at home is encrypted at rest.
And this is yet another situation where the external USB drive proves to be useful. I store it in a way that makes me sure in case of burglary it stays where it is - forgive me for keeping the details secret :) and believe me it’s not just “security by obscurity”.
Sometimes You Have a Really Bad Day
I consider also extreme scenarios. Massive fire can break out in my house or a plane can crash into it (hopefully when we’re all not at home). This is highly unlikely but there are some certain types of data that I wouldn’t like to lose under any circumstances. This primarly includes things that are irreproducible, e.g. family photos.
This is why I upload some of my incremental backups to Amazon Glacier. It’s an AWS cloud service that offers free upload and cheap storage. The catch is that retrieval costs real money but hopefully I will never need it. With the sole exception of a totally catastrophic event I should be able to restore everything from the external USB drive.
Do I need to mention that I have those files encrypted at my end before uploading to the cloud? I take full responsibility for protecting my own data and trust no one on that.
Opportunities for Improvement
In this whole extreme setup there are things that I can definitely do better.
First of all currently there’re way too many manual steps in the process. I create incremental encrypted backups with a custom script that I run periodically by hand. I upload files to Amazon Glacier with GUI client. There’s a lot of room for automation in this area.
I’m also not happy with how my phone is situated in this setup. I connect it to my laptop from time to time and download crucial files (e.g. photos) that later end up in incremental backups. But something tells me I’m going to learn the hard way what I missed once I lose or break my phone.
- 7zip to archive and encrypt data
- My own batch and Python scripts to orchestrate the use of 7zip
- Synology DSM to manage the encrypted network storage
- FastGlacier client to upload data to Amazon Glacier
As about the scripts, you can find the source code with some user’s manual in batchup repository. It’s not a piece of code I’m particularly proud of but it has a great advantage - it works. At least in my case. With some different setup you may not be so lucky :) Thus I’m making it available more as an inspiration rather than a ready solution.