Use Backblaze B2 API to send backups to BackBlaze B2

I have been using BackBlaze B2 to store backups of my non virt servers and it rocks. I request virt add B2 support as a backup destination. They ahve an API, and they are much cheaper than any of your other listed cloud storage providers. If you'd like i can find the api...but i am not a developer..:)

Status: 
Active

Comments

btw for ubuntu operating systems you could leverage Duplicati 2.0 which is already present in the base packages of the distros IIRC.

Do they have a command-line tool as well, or just a published HTTP API?

I'll look into this - it's certainly possible to implement.

has this been implemented?

Sorry, we unfortunately don't have an ETA.

I was just about to provide an example of how to use Duplicity in the meantime until we're able to add feature into Virtualmin, but reading your comments above it sounds like you're already quite familiar with that.

That would be my recommendation for now, to use Duplicity from cron until that feature is completed.

no worries. I have a workaround in place that doesn't involve going outside of virt(experience has taught me going outside of virt leads to bad things with virt). I make heavy use of the current backup feature so I found a different way. However once B2 is directly implemented it will allow me to greatly reduce my complexity in the hosting backend..:)

RJM Web Design's picture
Submitted by RJM Web Design on Thu, 08/01/2019 - 13:11 Pro Licensee

I just use rclone to copy the entire contents of the backup directory to Backblaze as a post-backup command (using the Virtualmin backup GUI). It hasn't failed yet.

TECHNICALLY i already am. however it would be nice for virt to be able to do it directly. However the system i have setup gives me my three layer backup system for my webhosting clients so it's not a huge priority for me at the moment..:)

RJM Web Design's picture
Submitted by RJM Web Design on Thu, 08/01/2019 - 14:47 Pro Licensee

I think I have seven-day retention set up on that bucket. I forget offhand. It's so cheap, it doesn't pay NOT to be redundant about it.

I’d love to see support in Virtualmin for other S3 API-compatible storage services like B2, SwiftStack, Eucalyptus, Scality, Wasabi, etc..

This has been requested in other posts, e.g.:

VirtualminPro BackBlaze B2 Cloud Storage
https://www.virtualmin.com/node/67311

Add Support for Backblaze B2 Cloud Storage
https://www.virtualmin.com/node/52481

Amazon S3 Compatible Alternative
https://www.virtualmin.com/node/22964

Virtualmin should work with S3-compatible APIs already.

To use an S3 compatible backup, you can go into Backup and Restore -> Cloud Storage Providers -> Amazon S3, and there, select the "S3-compatible server hostname", and add in the correct hostname offered by your provider.

That being said, I didn't think Backblaze was S3 compatible.

However, you can use the above with any service offering S3 compatible backups.

RJM Web Design's picture
Submitted by RJM Web Design on Sat, 02/22/2020 - 05:28 Pro Licensee

Backblaze B2 isn't S3 compatible. They have their own API, and there are many third-party software packages that can interface with it. I find rclone to be the fastest and easiest to implement if one has a passing acquaintance with the terminal, but there are others.

I run rclone as a post-backup command and it's been working flawlessly for seven months. Running it as a post-backup command also means that Webmin waits until the remote transfer is completed before sending the confirmation email and reports the total time rather than just the local backup time, which is good because I know that the entire job has completed successfully.

The big advantage to Backblaze for server backup is that uploads are inexpensive. Downloads, not so much; but they're not so expensive that you have to worry about taking out a loan if you ever need to use one. They're also reliable, which is why I can't comment on their support (I've never needed it). They're pretty ideal for server backup because you can store absurd numbers of versions quite inexpensively.

In summary, yes, I think Backblaze would be a worthy addition to the Webmin remote destination options. If my Perl didn't suck so much, I might just code it myself. But rclone is an easy-to-use, free alternative that also works well and takes about five minutes to install and configure. But B2 is not S3 compatible.

Maybe someone who actually knows what they're doing in Perl can start with rclone and write a GUI wrapper specific to Backblaze B2, and there would be your integration.

Richard

Thanks for the writeup, Richard! I’m glad to know B2 isn’t S3-compatible. I guess I just assumed that.

andreychek, I had no idea I could change the hostname under Backup and Restore -> Cloud Storage Providers! Thanks for the info.