Restic backups to B2 without delete - 2023

Restic 0.15.0 quietly merged #2398 which finally allows native support of keys without delete permissions.

After updating the binary on relevant systems, reversing the two changes from my earlier post (i.e. swapping rclone:b2:bucketname/foldername back to b2:bucketname:foldername & removing the extra rclone args) leaves a simple restic solution working with defaults. Awesome!

I had updated directly from 0.9.6 and checking the docs includes quite a significant warning:

Warning:

Due to issues with error handling in the current B2 library that restic uses, the recommended way to utilize Backblaze B2 is by using its S3-compatible API.

Follow the documentation to generate S3-compatible access keys and then setup restic as described at Amazon S3. This is expected to work better than using the Backblaze B2 backend directly.

Different from the B2 backend, restic’s S3 backend will only hide no longer necessary files. Thus, make sure to setup lifecycle rules to eventually delete hidden files.

Backblaze have also publicised the S3 api as a good default:

So, which API should you use? In a nutshell, if your app is already written to work with S3, if you’re using tools that are written to S3, or if you’re just unsure, the S3 Compatible API is a good choice. If you’re looking for more control over access and key management, the B2 Native API is the way to go.

It looks like this github comment is the source of that warning showing that the b2 library used has been a maintenance burden for the project.

Amusingly, and as per the warning above, the S3 api uses hide file rather than delete in the first place! I guess I'll be following that recommendation...