B2 Backup

Posted : admin On 1/29/2022

STEP 1 - Locate the Time Machine backup (.sparsebundle) file on B2 On any computer with a web browser, log in to your Backblaze B2 account. Select 'Browse Files' for the bucket containing the Time Machine backup. Locate the Time Machine backup '.sparsebundle' file. Mar 31, 2021 How to use Synology Hyper Backup with Backblaze B2 Mike Farace March 31, 2021 04:13 Synology’s Hyper Backup allows users to back up various kinds of data (system configurations, shared folders, and applications/packages) on your Synology NAS, manually or by schedule. Backblaze also gives customers access to Backblaze B2 Storage, which will make your cloud backup target choices a lot simpler, if limited. If you're accessing your data or restoring it, you'll. Backblaze offers B2 cloud storage which is similar to and compatible with Amazon S3. The advantage of Backblaze B2 is that you can use a variety of 3rd party integrations/software in order to backup your data. That means you have options when it comes to the software.

A huge upside to how the UniFi Controller works is that it’s not really dependent on where it runs to operate, it does however require the DNS hostname, some firewall ports and most importantly, the site data.
This results in that there is no real need to perform server level backups, all you need is the site data.
If the server were to break for some reason, spin up a new one, install the Controller software again and import the backup data, the gear will reprovision once but no further action is needed. ofcourse, provided that the gear is set up with a DNS inform-url.

The Controller does provide a way of automating the backups as of version 5.1.0 but the resulting .unf files are stored locally in {data.dir}/backup/autobackup. As in, if the server were to break the backups wouldn’t do us much good.
Solution: Move the backup data off-site.

I’m a big believer in Cloud infrastructure and Backblaze is a service I’m using to backup my local workstation data, when they announced B2 I jumped ship right away.
B2 is for my purposes a Backblaze backed FTP service, in reality though it’s so much more, the beauty of it for this purpose is that the first 10GB are free, seeing as the UniFi backups doesn’t grow too large in my environment I’m left with a free off-site reliable cloud hosted backup location.

What you’ll need

– SSH Access to the Ubuntu/Debian based machine running UniFi Controller
– A Backblaze account

Setup

The setup is split up in a few steps, when complete you’ll end up with an automated solution to move .tar.gz copies of the controllers automated backup files as well as all of the pure site data from local storage to a Backblaze B2 Bucket.

UniFi Controller

First off, enable the automatic backup feature of the UniFi Controller.
Settings – Auto Backup – Enable Auto Backup.
Performing the backup does increase resource usage for a short while, depending on size, and should ideally be done during a maintenance window or off-hours.
Select a time that works for you.

Backblaze

Backblaze B2 Storage

You’ll need to create a Backblaze account aswell as a Bucket. At the time of writing this is completely free.
With the account created, head over to the B2 page and sign up using the same email address. Verify your email, setup your phone number as well as the not needed but highly recommended two-factor authentication option.
When the processing is done you should be able to see “B2 Cloud Storage” in the left hand side menu of Backblazes “My account” section, this however might take a few minutes.
Begin by selecting “Show Account ID and Application Key” followed by “Create Application Key”, note the provided values, as these can’t for all intended purposes be changed later.
While you’re here, go ahead and create a Private Bucket, give it a unique name.

Backup To B2

Server

I’ve created and distributed the installation procedure/command reference over on GitHub as well as below.

B2 Backup Docker

unifi-b2-setup.sh
Backup