0

I'm in the process of configuring what I hope will be a sensible, redundant backup solution for my home. I have a dual boot laptop (Ubuntu and Windows) and a home NAS. The idea is to set up backup software in each OS to backup to the NAS, and then backup the NAS to cloud storage.

The data involved is documents and photos mainly, I think the total is between 50 and 100 GB. There will probably be other devices added later, along the same lines of however I do this. Apart from hosting these backups, the NAS will also host a larger repository of digital photographs, which should also be included in the cloud backup.

To start from the back, I'm pretty comfortable with the idea of running a backup script from a local Raspberry Pi (I have a few in place already), using duplicity to backup relevant NAS directories to a Backblaze B2 storage, with GPG encryption done client-side - much along the same principle as this blog post details:

https://msol.io/blog/tech/dirt-cheap-client-encrypted-online-backups-with-raspberry-pi/

This would give me client-side encrypted data, bandwidth-efficient transfers and I hope a reliable cloud service at a good cost. I'd probably want regular full backups to avoid excessively long backup chains, not sure if duplicity handles this by itself or if I need to allow for it in my script, but I guess I can manage that.

Where I'm more unsure how to process, is the PC-to-NAS stage. I started out with Ubuntu's built in Deja Dup, but realizing that uses duplicity as a backend too, I wonder:

Does it make sense to use something like duplicity in both steps of a two-tier backup solution? My concern is that in the event that I need to recover from cloud backups, I would need to restore twice, which might be inefficient, or worse less robust in case a single corrupted file in either backup chain would mess things up. Is this a reasonable concern?

If it is, what's a better way of doing it? I had the idea of simply doing a weekly (or whatever) rsync from Ubuntu to the NAS, so the NAS simply has a 1:1 copy, and the NAS-to-cloud step could handle all the cleverness of restorability from different dates, encryption and whatever else.

The downside to this would seem to be efficiency in the first step, where I'd have to copy a lot of data every time I backup. Perhaps using rsync's --link-dest option would work, hard-linking to any existing files rather than copying them again, but I'm not sure if this would be robust or even work with a second stage backup via duplicity.

I realize this question is far too long and messy, but I've spent some time thinking about the ins and outs of how to do this in a good way, and felt I had to ask in the end. If you read this far, thank you. If you have any wisdom at all to offer, thanks even more.

  • No offense, but reading your post really makes me consider why anybody would need to be so “cheap” that they would devise an overly complicated idea with higher risk of data loss. Your stated goal is to backup documents and photos. That is easily done for a mere $5 to $20 per month if not less. Numerous NAS devices or cloud storage services can handle this for you. Sure the Linux setup might be a bit more complex, but certainly there is a reasonably priced service out there that works on Linux also. I’m glad you’re learning and experimenting, but you get what you pay for. – Appleoddity Feb 19 '18 at 4:35
  • Should I understand your comment as suggesting that a two-stage backup scheme is always a bad idea because of the complexity it adds? Or that such a scheme should only be implemented with commercial software? Perhaps I wasn’t clear on my priorities: I would like two backups, one local and one remote. Since I already own a NAS (older, unsure on built-in cloud support, and prefer hardware-agnostic solutions) the general idea of first backing up to that, and then backing up the NAS to cloud seemed like a conceptually straightforward idea. If there are better ones, I’m all ears. – anlag Feb 19 '18 at 8:08
  • I’m not suggesting redundant backups are bad. When you are using the complexity of what you are setting up to accomplish this you are risking something going wrong and finding out too late. It seems like a plan to save money. There are plenty of NAS systems and cloud backup solutions that make this really simple. I use google drive alone. My entire google drive syncs to a hard drive on a local computer and all my other computers sync directly to google drive. That’s two backups, plus I have file version history, change logs, and instance access to files via web and mobile apps. $10/mo. – Appleoddity Feb 19 '18 at 16:20
  • Thanks for your feedback. I guess the principal purpose of my question was to keep that complexity to a minimum while still fulfilling my goals. Saving money is nice but not crucial, it’s more a question of getting it right. Your example setup is neat and practical, but not quite what I have in mind. I assume you don’t have client-side encryption, and including in my case the NAS-only data (image repo) would also add an extra step (though doable of course.) – anlag Feb 20 '18 at 8:24
1

Anlag,

you are right. your setup is redundant. duplicity is packaging a duplicity backup in your second step.

what you probably want is

  1. easily accessible backups on site (plain files, preferrably snapshotted so you can restore a just deleted file from yesterday)
  2. encrypted backup off site, so your data is protected from spying eyes

. i'd suggest

  1. running plain backups (e.g. rsync) to the NAS (use btrfs for snapshots if it has enough power, else use rsync w/ --link-dest)
  2. use duplicity to backup these to remote

..ede/duply.net

  • Thanks a lot, that sounds like the direction I was heading, articulated in that many fewer words. btrfs is a great suggestion, and Netgear apparently do include it in their ReadyNAS OS 6, but unfortunately my NAS is a bit too old to support that OS. So I believe I will go ahead and implement a "plain" backup from PC to NAS with a nightly rsync (--link-dest) as the first stage. Is there any reason to do an occasional run without --link-dest? Given that it uses hardlinks and shouldn't be incremental, I guess not, but... – anlag Feb 20 '18 at 9:07

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.