Recently, I’ve been thinking more and more about backups for my small (but growing) homelab. The golden rule is to follow the 3-2-1 method for backups:
- 3 backups
- 2 different types of media
- 1 backup offsite
Current setup#
Currently, I keep an encrypted external HDD at home and another at work. Every couple weeks, I perform a backup to both and rotate the drives (this covers a 2-1-1 backup).
Planned setup#
- When running Duplicity to backup to B2 (Backblaze) it fails with the following error: Attempt 1 failed. AttributeError: B2ProgressListener instance has no attribute 'exit' Attempt 2 failed.
- Older versions of Ubuntu and Homebrew have older, incompatible versions of duplicity and possibly python. About A duplicity backend for BackBlaze's B2 file storage.
- Using Backblaze B2 as back-end. Using remote syntax example: duplicity localDirName b2://id: key@bucket-name/machine/ localDirName. Duplicity 0.7.17 worked flawlessly with above mentioned syntax. As of duplicity 0.7.18 - this does not work any longer, as duplicity simply uploads all files into root of the bucket, creating a real mess!
I’d like to add cloud storage for a full 3-2-1 backup. My idea is to centralize all my backups to one location, then send the backups offsite to a cloud storage provider. The setup below is my final goal and will fulfill my 3-2-1 requirement.
Storage providers#
In another HN comment, 10 months ago, the Backblaze CEO said that it was okayto use Cloudflare and Backblaze for streaming video files, since they partnered up under the Bandwidth Alliance. Also, 4 months ago, u/YevP, also said that you could use B2 for streaming, with Cloudflare for.
For this, I was looking for a raw storage endpoint with some sort of API or command line interface. I was not interested in a file syncing service (e.g., Google Drive or Dropbox) or a cloud backup solution (e.g., Crashplan or Carbonite). While looking for cloud storage providers, I compared the following:
I ended up choosing Backblaze B2 storage. They seemed to be the cheapest, had the most straight-forward pricing, and were the easiest to setup with the backup program I was using.
Full disclosure, I was already a Backblaze fanboy. I was already subscribed to their great blog where they post yearly stats on their hard drives. But, if that’s not enough, they offer free restores via USB flash drive or external HDD if your data is too big to download. And if you need to upload up to 40TB of data, you can request a Fireball (not free, but still cool).
Backup programs#
While looking for backup programs, I compared the following:
Shop for On Sale Nintendo Switch Consoles at Best Buy. Find low everyday prices and buy online for delivery or in-store pick-up. Ends today at 2:08am PT. Just Dance 2021 - Nintendo Switch. 3.7 out of 5 stars with 56 reviews. Insten Joy Con Charger for Nintendo Switch, 4 in 1 Joy-Con Charging Dock Station with Individual LED Charge Indicator for Switch.
Supergiant Spring Sale! 4/14 at 9:00 am PT to 4/25 at 11:59 pm PT. It's a great time to pick up HADES, one of the most celebrated games on Nintendo Switch, and recipient of more than 50 Game of.
I ended up choosing Duplicity. It seemed to be the most popular program, it supports incremental backups and B2 storage, and supports encryption with GPG.
Sign up and install B2#
Sign up for a B2 account if you don’t have one already. You can download the official B2 command line tool from these instructions, but I’m installing the package from the AUR using pacaur. Note - You can create a bucket from the website if you don’t want to install the B2 command line tool.
Setup a bucket#
Start by authorizing your account (substitute your account ID as needed). You will be prompted for your Application Key, which you can get in the B2 control panel.
This new design can mount flush against the wall of the house and the lid opens nice and smooth. Red wall mounted post boxes ireland. Sep 18, 2017 - Buy online Heritage Wall Mounted Post Box - Red Finish.
Now, create a bucket (make sure it is allPrivate). The bucket name must be globally unique to all of Backblaze, not just your account. You can have up to 100 buckets per account.
Finally, list your available buckets.
I highly recommend you encrypt your backups using GPG. It’s integrated into Duplicity and will protect your files from prying eyes. I won’t be covering it here, but check out my other guide on how to create a GPG key. For this setup, I will be using a separate key for encryption and signing.
Disclaimer - Don’t lose the keys or the passphrases to the keys. For example, don’t backup the GPG keys using Duplicity, then have your hard drive crash, which would require the GPG keys to unlock Duplicity. Store the keys on a separate backup by themselves.
First, install Duplicity.
Duplicity basics#
The basic syntax for Duplicity is below.
To backup directly to a server via SFTP, use a command similar to the one below.
To backup a folder to your B2 bucket, use a command similar to the one below. Substitute your account ID, application key, and bucket name as needed.
Duplicity also handles rotating backups. Here, I’m remove backups older than 3 months.
Duplicity script#
Because Duplicity has so many command line options, it’s easier to setup a script and run it via cron.
Veeam Backblaze B2
Hope this helps!
Qnap Backblaze B2
-Logan