Install And Setup Backblaze B2 Backup For Ubuntu

December 13, 2017

Backblaze is a cloud storage (like Amazon S3, Google Cloud Storage, etc.). Below

Comparison of Cloud Storage Pricing

Last Updated: 13 Dec 2017

Provide Storage ($/GB/Month) Download ($/GB)
Backblaze B2 $0.005 (Free 10GB) $0.02
Amazon S3 (Singapore) $0.023 ~ $0.025 (Free 5GB*) $0.08 ~ $ 0.12
Amazon S3 - Infrequent Access Storage (Singapore) $0.02 $0.08 ~ $ 0.12
Amazon S3 - Glacier Storage (Singapore) $0.005 $0.08 ~ $ 0.12
Google Cloud Storage $0.02 - $0.026 (Free 5GB) $0.08 - $0.23
Google Cloud Storage - Nearline $0.01 ($0.08 ~ $0.23) + $0.05
Google Cloud Storage - Coldline $0.007 ($0.08 ~ $0.23) + $0.01
Digital Ocean Object Storage $0.02 ($5 for 250 GB + 1TB Transfer) $0.01

Seems like Backblaze B2 has the highest free quota, cheapest storage price and cheapest data transfer/download fee, and not to mentioned a very simple pricing structure.

The advantage of Amazon S3 and Google Cloud Storage is availability of services to enable fast regional data serving like CloudFront, CDN, built-in edge caching, etc.

But from a pure data backup perspective, Backblaze B2 pricing is very competitive.

Get Account ID and Application Key

Visit Backblaze -> My Account -> (B2 Cloud Storage) Buckets -> Show Account ID and Application Key

Backblaze Get Account ID

Copy the Account ID and click on Create Application Key, copy the Application Key as well.

Note: Application Key will not be stored, so you must copy it and keep it safe. Though you can generate a new Application Key, but once you do that the old Application Key will no longer work.

Backblaze Create Application Key

Create Bucket

Click on Create Bucket to create a storage bucket. Select Private if it’s for personal backup.

Backblaze Create Bucket

Backblaze B2 command line tool

Install pip.

sudo apt-get install python-pip

Install b2.

sudo pip install b2

Run authorize_account with the copied Account ID. You shall be promoted for the Application Key.

b2 authorize_account [Account ID]

NOTE: b2_authorize_account

When using the master key, the “key id” is your account ID, and the “application key” is the one you got from the web site.

List your storage buckets.

b2 list_buckets

Upload file to bucket.

b2 upload_file [BUCKET_NAME] [LOCAL_FILE_NAME] [SERVER_FILE_NAME]

Check the list of b2 commands.

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.