Backblaze B2へのバックアップと画像アップロードの設定

So I was following the Digital Ocean Spaces guide, and I started looking around for cheaper providers for my (very) small community. I noticed this old post which confused me, because I had just looked at Backblaze B2 and saw that it was S3 compatible. Turns out they launched the feature 30 minutes before I had looked (what luck!). So I have decided to write a quick guide on how I got it to work with my current community:

Step 1: Configuring Backblaze B2 Cloud Storage

Create Account
Go to B2 Cloud Storage and click on Sign Up Today.

Generate App Key
Click on “App Keys” or go to this page. Click “Add New Application Key”, name it, then click “Create New Key”. Make sure you record the keyID and applicationKey as they will be hidden once you leave the page.

Create Upload and Backups buckets
Go back to the buckets page and create your desired buckets. Make sure the uploads one is public, and the backups one is private. (TODO: Test auto creation from discourse)

Step 2: Configuring Discourse

This step mostly follows the Digital Ocean Spaces guide, with the following notable differences:

  • Use your App Key keyID with the s3 keyID field.
  • Use the App Key applicationKey with the s3 secret access key field.
  • Use the s3 endpoint provided in the App Key.
  • Leave the CDN blank unless you are providing your own.

For more information on Backblaze B2 S3 compatibility, see this blog post.

「いいね!」 8

So has the Backblaze substitution been working seamlessly for you, no glitches?

I just came here looking for info as I notice it provides 10 GB of free space which would reduce my hosting costs. I’d need to migrate my existing S3 content first though. I’m also curious if anyone has migrated a live instance of Discource from S3 to Backblaze.

「いいね!」 1

Instead of carrying this topic, let’s get it added to the s3 clones listing:

「いいね!」 5

古いスレッドですが、このガイドはまさに私が探していたものです。私も小規模なコミュニティを持っており、DigitalOcean のメインサーバーではなく、クラウドに画像やバックアップを保存することを検討していました。これにより画像ファイルによるサーバー負荷が軽減され、サイトがよりスムーズに動作するはずです。

Backblaze が Cloudflare と提携して無料のデータ転送を可能にしている点が気に入っています。私たちはすでに DDoS 保護のために Cloudflare の無料ティアを利用しています。データ転送料がかからないため、ストレージ代のみを支払えばよく、コスト削減につながります。近日中に、Cloudflare を組み込んだ手順で設定を試みる予定です。

「いいね!」 1

バックアップが正しく動作するようになりました。Discourse のバックアップは、Backblaze のバックアップバケットに送信されます。\n\nただし、Discourse の画像アップロードが Backblaze のアップロードバケットに表示されません。パブリック設定になっていることを確認しました。\n\n何かアイデアはありますか?

@Bill サポートについては、Configure an S3 compatible object storage provider for uploads を参照することをお勧めします。

Cloudflare を使ってこの設定を正常に完了したので、私の経験を共有させていただきます。Cloudflare は従来の CDN とは異なります。私は DDoS 対策、SSL、キャッシングのために利用しています。ただし、S3 ストレージを設定するには、別の CDN が必要のようです。私は比較的安価な BunnyCDN を使用しました。Backblaze で作成したアップロードバケットの URL を指すプルゾーンを設定します。

その後、以下の手順に従ってください:Configure an S3 compatible object storage provider for uploads - #106

なお、これは今後アップロードされるファイルや画像のみが対象であり、既存のファイルは移行されません。

「いいね!」 3