Creating Immutable Backups with B2
If you want to create immutable backups on B2, you must add your B2 account as an “S3-compatible” storage location. Also, make sure the “bucket” in your B2 account has object-lock enabled.
Create a “bucket” in your B2 account with object lock enabled:
- Log into backblaze.com
- Click on the “Buckets” link on the left.
- Click “Create a Bucket” on the right.
- Enter your bucket name, and make sure you check “Enable” for “Object Lock”.
- Back in the main account page, locate your new bucket and note the “Endpoint” value.
Create a B2 “app key”:
- Log into backblaze.com
- Click on “App Keys” on the left.
- Click “Add a New Application Key” on the right.
- Name the key and give it access to the “bucket” you just created (or all buckets).
- Make sure access is “read and write”.
- Click “Create New Key”.
- Copy and paste the “keyID” and “applicationKey” values shown with your new key. The “applicationKey” value only appears here once!
Add your B2 bucket as an immutable storage location in Arq:
- Pick “New Storage Location” from the File menu.
- Choose “S3-Compatible Server” and click “Continue”.
- For “Server URL”, enter “https://” plus the “Endpoint” value from the backblaze.com web site. For instance, if the “Endpoint” shown at backblaze.com is s3.us-west-001.backblazeb2.com, enter https://s3.us-west-001.backblazeb2.com for the “Server URL”.
- For “Access Key ID”, enter the “keyID” from above.
- For “Secret Access Key”, enter the “applicationKey” from above.
- For “Region”, enter the region in the Backblaze URL. For instance, if the Backblaze URL is s3.us-west-001.backblazeb2.com, the region is “us-west-001”.
- Click Continue.
Now you have a storage location configured in Arq. The next step is to create a backup plan and enable immutable backup records.
More info about Backblaze and their S3-compatible API is here.