Table of Contents
Backblaze
Backblaze is a company offering products/services centering around backup. Beacon Technology uses Backblaze B2, which is an S3 compatible object storage service.
Relevance to Beacon
Backblaze B2 is primarily used for WHM/cPanel off site backup.
Theory of Operation
B2/S3 is an http/rest based protocol. Access to objects and buckets are done over http rest based API.
S3 compatible storage is similar to files on a normal filesystem, but not exactly the same.
Files are objects.
Objects are stored in buckets.
Permission is enforced with keys being associated to buckets normally.
There is typically no cap on the amount of space you can use.
Buckets
Typically buckets are free or low cost, so there is no reason to use less buckets if you need them.
Permissions to data in B2/S3 primarily center around buckets. Therefore, partitioning of data should be done on a per bucket basis.
Applications should only have access to buckets they need to have access to.
Application Keys
Application keys are how applications access B2 buckets. The keys consist of 2 important pieces of data. KeyID and ApplicationKey. When setting up an application, both pieces of data are required.
Permissions are associated with keys and buckets. Permission is granted per key, therefore when creating keys we are creating more openings.
Setting up new application
Getting new applications connected to B2 is not very hard, but can be a bit confusing sometimes due to the names of certain parameters being a bit different.
Every new instance of an application should ideally have it's own key.
Setting up an application typically requires 4 pieces of data:
- Endpoint
- Bucket Name
- keyID
- applicationKey
The application may have other parameters, but those 4 pieces of information are how you connect the application to backblaze or any other S3 compatible storage.
Creating Application Keys
Creating keys is simple and straight forward. To create new keys:
- Log into Backblaze
- On the left hand side, click “Application Keys”
- Scroll down a bit until you see the button “Add a New Application Key”. Do not mess with the button “Generate New Master Application Key”
- A new window should now be open.
- For the name, choose a name which will later allow you to identify what machine and software/application the key is for. This is important because if you ever need to revoke a key due to security issues, you want to know which key belongs to which machine and application.
- For “Allow access to Bucket(s)”. You can select “All”, however then the key would have access to all buckets. This is less secure than selecting a specific bucket. Allowing access to only specific buckets is more secure than allowing access to all buckets.
- If you select a specific bucket, then a new option will appear. “Allow List All Bucket Names:” When you check this box, the key will be allowed to see the names of all the buckets on the account, but will only have permission to the one bucket that is selected.
- “File name prefix:” and “Duration” usually do not need to be filled in.
- Click “Create New Key”
- Do not close or navigate way from the page.
- You should see “Success! Your new application key has been created. It will only appear here once.”
- Please copy down the new keyID, keyName and applicationKey temporarily until you have entered it into the application where it will be used.
- If you loose the applicationKey you will be forced to make a new key.
- Note: when setting up a new application with a bucket, please make sure the Endpoint is correct for the bucket.
Billing
Backblaze B2 bills you only for the space and bandwidth you use. As of now, bandwidth is free for the first 3x of space you use. For example, if you use 10GB of space, you get 30GB of free egress.
The account should periodically be monitored to check how much space is used to avoid surprise bills.