Converting a Backblaze B2 Bucket to Be S3-Compatible
Huzzah! Backblaze B2 now supports an S3-compatible interface!
If you search about how to enable the S3 interface on an existing bucket, the first thing you’ll likely is find is… you can’t. You have to transfer everything to a new, S3-enabled bucket.
If you search for how to do the copy to the new bucket, you’ll find an article by Backblaze that suggests a $45 file copy tool or individually copying files with the B2 CLI. Seriously?
Use rclone
! It will do the server-side copying where possible.
First, set up a new remote using rclone config
. I used the name b2
. Next, test the copy with rclone copy b2:bucket1 b2:bucket2 --progress
. You can cancel it with Control-C.
The reported transfer speed will be correct, but in my usage the total sizes were wrong and increased over time. Use the Backblaze web interface to monitor the bucket size.
To speed up the transfer, pass higher N in --transfers N
. In my case with a Restic repository with many 5 MB files, --transfers 200
transferred data at 500 MB/sec and 100 files/sec. That’s about 100x faster than what my internet connection could support!
Enjoy your new S3-enabled bucket!