Skip to main content

Off-Site Proxmox Backups With PBS and Backblaze

·403 words·2 mins

I recently setup off-site backups using Proxmox Backup Server (BPS) and Backblaze (B2). This guide will show you how to do exactly that.

Prerequisites
#

  • A PBS server
  • A Backblaze account
  • Money

1. Creating a bucket
#

This bucket will be where we are going to be storing all of our backups.

To create this bucket, head over to the B2 Cloud Storage page, and click Create a Bucket. Give the Bucket a Unique Name, make sure the Files in Bucket are set to Private and Default Encryption is optional, I also have Object Lock set to Disable.

I recommend opening up the Lifecycle Settings for your bucket and setting it to Keep only the last version of the file.

2. Creating an application key
#

In order for PBS to be able to upload and download from our bucket, we need to create an application key. We can do this by heading over to the Application Keys page.

Once you are on this page, click the Add a New Application Key button and set the Name of Key to something descriptive, changing Allow access to Bucket(s) to the name of the bucket we just created, also ticking the Allow List All Bucket Names check box. Make sure to take note of the keyID and the applicationKey.

3. Connecting PBS to your Backblaze S3 endpoint
#

To connect PBS to our new bucket, we will be using an S3 Endpoint, to do this, head over to the S3 Endpoints tab in the PBS web-ui under Configuration and hit Add.

Set the S3 Endpoint ID to something unique, I chose backblaze, set the Endpoint to {{bucket}}.s3.{{region}}.backblazeb2.com and Region to whatever region your bucket is in, for me, it is eu-central-003 and fill the Access Key with your keyID and the Secret Key with your applicationKey. Then click the advanced box, and set the Provider Quirks to Skip If-None-Match header.

4. Create a datastore
#

Now that we have added our S3 endpoint, we can now create a datastore.

I set the name for mine to backblaze, the Datastore Type to S3 (Tech Preview), the Local Cache to /tmp/backblaze-s3-cache, the S3 Endpoint ID to backblaze and the Bucket to the name of your bucket. You can then hit add.

Done
#

Now you can add this datastore to PVE and backup to Backblaze via S3. I have automated mine to run every Saturday at midnight.

DontDDoS
Author
DontDDoS
KUBERNETES!!!