4

A friend has kindly allowed me to store a hard drive at his house to use as an offsite backup. I normally use rsync-backup to make backups of my home directory and have always done this (just being lucky!) to 2 separate USB drives. This has been great but the chance of a house fire has always terrified me. My previous job let me keep a drive in a desk drawer but wouldn't allow it to be connected to the network. It was such a pain to bring it home every few weeks and rsync that laziness prevailed. My friend's ONE request is that the drive be encrypted so there's no chance of privacy issues -- either him reading my files, or him being somehow liable for anything that might be on the drive.

I have googled a LOT about this topic but the problem is that most of the whole drive encryption walk throughs are for an OS. Not a remote drive. I am hoping that someone out there knows how to set this up so that (ideally) a cron job can run at a regular time nightly or maybe weekly, updating everything from the drive at my house onto the one at his place. He has high speed cable, so it shouldn't be problematic to do this and I'm going to FIRST do the initial rsync at home...then give him the drive, he'll install it at his place and give me access via a unique server, and hopefully things will go from there.

Thank you for any and all help with this project. If this is easily answered somewhere, please let me know where -- I've done tons of searches and just can't find the right keywords to get the info I want. I end up just getting to pages for making LUKS volumes within an OS...and I either don't understand how that's the answer or else it's NOT the answer.

I should add that I'm avoiding Cloud-based options because of expense. I have about 6TB of data (I'm a photographer/videographer working with very large files over decades...) and I just can't afford the fees involved with typical cloud storage. Even if I could, I would want to know how to ensure the data's encrypted and how to do regular automated backups. But this option to have my own hard drive at a friend's place seems awesome.

Again, thank you! :-)

  • crashplan.com gives their software away for free. It supports always-up-to-date, incremental, encrypted backups to a friend's computer. – Neil Smithline Feb 9 '16 at 17:30
  • CrashPlan just recently began sunsetting their Home service. I'm not clear what this means for the backup-to-a-friend use case: crashplan.com/en-us/consumer/nextsteps – jia103 Sep 2 '17 at 6:09
  • According to twitter.com/crashplan/status/900134944898514944 computer to computer backups are also cancelled. – mcchots Oct 4 '17 at 9:32
  • A little late, but for the next guy: You're looking for duply. It's a wrapper to automate duplicity and it'll allow you to use GPG to encrypt your backups without using a password. – user8675309 Dec 5 '17 at 14:39
3

It sounds like you want a tool like duplicity, which uploads pre-encrypted deltas. It works with multiple backends (from ssh and sftp to AWS) so your friend doesn't need to be running Linux. By using an existing tool you won't need to reinvent anything (except for maybe setting up your own cron job which can access a gpg key for duplicity to use) and you can reuse this solution with cloud (untrusted) providers for smaller sets of data or when it becomes more feasible to upload 6TB of data.

  • So I've looked into Duplicity and it seems like just the thing. One question though...to reduce bandwidth, I'd like to mount it locally first and do the first mega-transfer at home. Then bring it to my friend and have him plug it into a server at his place. I'll then be uploading the deltas regularly with a cron job. It wasn't clear to me exactly how that would work...whether I have to put an empty drive at my friend's first, or if this is a viable plan. Any thoughts? – user1149499 Apr 13 '16 at 19:42
  • @user1149499 That will work just fine. – drewbenn Apr 13 '16 at 21:25
  • Awesome, thanks so much @drewbenn...hugely helpful. Will try this and hope it's exactly what I'm looking for! – user1149499 Apr 14 '16 at 1:36
  • Another possibly really dumb question: I've started the backup at home, just on my computer using the passphrase option. But if/when I set up the drive on my friend's system and want to use RSA hashes to authenticate, will that mean the current full backup is unreadable? Basically, will I need to set up the RSA hash system first and THEN do my first full backup? Or can the two methods decrypt independently and work together? – user1149499 Apr 16 '16 at 13:20
  • What do you mean by "RSA hashes to authenticate?" I'm assuming you're going to use SSH and probably a keypair for passwordless authentication. If so you won't have any problems, you'd just use ssh://user@friend.com/backuppath as the destination instead of /mnt/backuppath. You might need to test a couple times (eg with --dry-run) to make sure you get the paths right. – drewbenn Apr 18 '16 at 0:39
0

Ideally, in order to provide full deniability for your friend, you would encrypt at your end, and send only the encrypted data to the remote system. This in turn could have full disk encryption enabled, but it would be less of a deal breaker.

Why?

Imagine that you are sending an image to your backup. Your friend has access to the hardware, so could theoretically grab any data that comes into his server, and presumably has some means of looking at this, even if it is using SSL or similar encrypted transport messages - it's his server, so he can grab the certificate and decrypt this data. That means that before it is stored he can look at your data. That's point 1 broken - he can't say that it's impossible for him to read your data.

Imagine then that you're sending an illegal image to your backup. The remote server receives it, and stores it in memory whilst encrypting it to go onto the disk. At that point, the police break in and dunk the server in liquid nitrogen, perform a memory analysis, and find that there is an illegal image held there. Your friend gets arrested for possession of illegal images - that's point 2. He can't prove that he didn't know what the data was.

On the other hand, if you encrypt before sending, all that is received by the remote server is encrypted data. It can encrypt it more if you like, but assuming you pick a reasonable data encryption method, your friend can't read anything you send, and the remote server has absolutely no idea what it's holding. It's just a series of random seeming bytes.

If you go down this route, you could either look at any native OS FDE solution, or a hardware based encryption drive. At your end, you need a system which encrypts and sends the data across - there are a number of options there, but recommending one would be best suited to Software Recommendations SE, rather than here.

  • Thank you @matthew, yes, that's exactly right: I want to encrypt before anything arrives at his end. I was assuming that something like rsync-backup could encrypt before..is that not the case? Not sure how to do this but maybe pipe the output of the backup to an encryption method and then pipe THAT output to rsync? What is OS FDE? Maybe what I'm trying to do is actually harder than I thought? It sounds like you're saying an ssh-tunnel would not be secure? I greatly appreciate the help. In all honesty, I doubt he'd look and there's nothing illegal...personal, yes. But worth liquid NO2. :-) – user1149499 Feb 9 '16 at 17:11
  • Another thought was to encrypt the entire disk and then use some kind of remote dd script to just make a mirror of it. It doesn't have to be the highest tech solution as long as I can keep regular, cronned backups going and make sure of getting the data if one disk ever fails. – user1149499 Feb 9 '16 at 17:12
  • There are even some backup solutions that will do basically this - Crashplan is one (although there have been some questions about the specific algorithm they use), and supports connection to custom endpoints. An SSH-tunnel would be secure for transport, unless the certificate on the remote server is compromised (e.g. the server is stolen, friend gets nosy, it gets hacked) – Matthew Feb 9 '16 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.