1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PBS4からの新機能、S3互換APIを使ってS3をデータストアとして利用する

Last updated at Posted at 2025-07-26

PVE9.0・PBS4 シリーズまとめ

概要

β版の内容です!
今後修正される可能性があることに注意してください!

この機能はテクノロジープレビューです!
今後修正される可能性があることに注意してください!

PBS 4.0 BETA がリリースされました。
AWS S3だけでなく、S3互換APIが利用できるストレージであればデータストアとして利用できるようです。
またローカルキャッシュを保持して、クラウド使用料を削減しようとしてくれるみたいです。

S3-compatible object stores as backup storage backend (technology preview).
Proxmox Backup Server can now connect to object stores that provide an S3-compatible API.
A new datastore type persists backup metadata and chunks to an S3-compatible object store.
To reduce the number of requests to the object store, a local cache temporarily stores metadata and chunks.

今回はAWS S3を使います。
またバージョン4.0.6-1を使って評価しましたが、既に4.0.7-1が公開されているので、詳細異なるかもしれません。

S3の設定

詳細は省きますが、以下を用意します。
また設定時に必要な情報はインデント上がっているところです。
※今回は検証のためのガバガバ設定でやりました。あくまで例です。

  • S3バケット
    • バケット名
    • リージョン名
  • IAMユーザー
    • アクセスキー
    • シークレットキー

S3 エンドポイント設定

設定-S3 Endpoints-追加から追加できます。

image.png

  • S3 Endpoint ID
    • 任意の名前
  • Endpoint
    • {バケット名}.s3.{リージョン名}.amazonaws.com の構文で作成します。
  • Region
    • バケットのあるリージョン名
  • Access Key
    • 個別の認証情報
  • Secret key
    • 個別の認証情報
  • Path style
    • vhost形式との切替
    • 今回はOFF(デフォルト)
  • Fingerprint
    • 自己証明書の時に必要

image.png

詳細はマニュアルを読んだ方が理解できると思います。
テストリポジトリに公開されているものか、PBSローカルから閲覧できます。
以下はEndpointの解説です。
※この構文に関する部分をちゃんと読んでおらず、はまりました。

In the endpoint configuration, provide the REST API endpoint for the object store. The endpoint is provider dependent and allows for the bucket and region templating. For example, configuring the endpoint as e.g. {{bucket}}.s3.{{region}}.amazonaws.com will be expanded to my-pbs-bucket.s3.eu-central-1.amazonaws.com with a configured bucket of name my-pbs-bucket located in region eu-central-1.

データストアの作成

データストア-データストアの追加から。

Datastore TypeS3(tech preview)にすると項目が変更されます。

  • 名前
    • 任意の名前
  • Local Cache
    • ローカルキャッシュのパス。
    • 他データストアに合わせて /mnt/datastore/my-s3-store-cache としました。
  • S3 Endpoint ID
    • 作成済Endpointからプルダウンで選択します。
  • Bucket
    • バケット名

image.png

作成されました。
他のデータストアと同様に利用可能です。
なお、ここに表示されている使用状況はローカルキャッシュの状況です。

image.png

動作確認

他のデータストア同様に利用可能です。
PVEから利用することもできますし、同期対象としても利用できます。
今回は既存のデータストアを同期しました。
この際に巨大なデータをS3に同期しないように注意しましょう。(課金されないように)

image.png

同期ジョブ完了し、S3に同期されています。
もちろん、PBSの画面からも内容を確認することができます。

評価目的の人は忘れずに設定削除しておきましょう。(課金されないように)

(オマケ)PBSのデータストア削除方法

S3データストアを削除しようとしてやり方わからない人いる気がしたのでメモ。

GUI

データストアの削除はオプションタブの右端にあります。
危険!とありますが、この時削除しないとデータストアのパスをどこにしたかわからなくなり、削除したくてもどこかわからなくなりそうな気がします。

image.png

image.png

CLI

proxmox-backup-manager datastore removeからできます。
GUIと同等のオプション指定が可能です。

root@pbs:~# proxmox-backup-manager datastore remove
Error: parameter verification failed - 'name': missing argument
Usage: proxmox-backup-manager datastore remove <name> [OPTIONS]

 <name>     <string>
             Datastore name.

Optional parameters:

 --destroy-data <boolean>   (default=false)
             Delete the datastore's underlying contents
 --digest   <string>
             Prevent changes if current configuration file has different SHA256
             digest. This can be used to prevent concurrent modifications.
 --keep-job-configs <boolean>   (default=false)
             If enabled, the job configurations related to this datastore will
             be kept.
root@pbs:~#
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?