AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

Kubernetes Operator を使用したファイルシステムバックアップストアの構成

Kubernetes Operator は、ファイルシステム スナップショットのストレージをサポートします。

To configure file system snapshot storage, your Kubernetes Operator deployment must have a storage class configured with the ReadWriteMany method.

ファイルシステムのスナップショット ストレージを構成するには、次の手順に従います。

1

Create a PersistentVolumeClaim object, and allocate storage as needed. Set accessModes to ReadWriteMany:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: snapshot-store-ops-manager
spec:
storageClassName: managed-nfs-storage #SC that supports(RWX)
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10G
...
2

Create an Ops Manager CustomResourceDefinition that specifies your PersistentVolumeClaim object and the spec.backup.fileSystemStores field, which is the name of your file system snapshot store.

The following example creates a CustomResourceDefinition file named ops-manager-fs.yaml, for the MongoDB oplog store with a kube-user.

apiVersion: mongodb.com/v1
kind: MongoDBOpsManager
metadata:
name: ops-manager
spec:
replicas: 1
version: 8.0.0
adminCredentials: ops-manager-admin-secret
statefulSet:
spec:
template:
spec:
volumes:
- name: snapshot-store
persistentVolumeClaim:
claimName: snapshot-store-ops-manager
containers:
- name: mongodb-ops-manager
volumeMounts:
- name: snapshot-store
mountPath: /snapshot_store
backup:
enabled: true
fileSystemStores:
- name: filesystem1
assignmentLabels: ["test1", "test2"]
opLogStores:
assignmentLabels: ["test1", "test2"]
- name: oplog1
mongodbResourceRef:
name: oplog-db
# mongodbUserRef:
# name: kube-user
statefulSet:
spec:
template:
spec:
volumes:
- name: snapshot-store
persistentVolumeClaim:
claimName: snapshot-store-ops-manager
containers:
- name: mongodb-backup-daemon
volumeMounts:
- name: snapshot-store
mountPath: /snapshot_store
applicationDatabase:
members: 3
version: 8.0.0
3

MongoDB Ops Managerのリソース定義のファイル名に対して、次の kubectl コマンドを呼び出します。

kubectl apply -f <opsmgr-resource>.yaml
4

MongoDB Ops Managerオブジェクトがその状態を と報告するまで待ってからRunning 、oplog リソース の配置 手順の バックアップ設定の構成 の手順で説明されているように MongoDB Ops Managerストアを構成します。

5

MongoDB Ops Manager インスタンスにログインし、次のドキュメントに移動します。 Admin Backup Snapshot Store Create New File System Store

Set the name to the value you set for backup.fileSystemStores in your CustomResourceDefinition. Set the other values as appropriate, then click Create.

新しいファイルシステム ストアを作成すると、MongoDB Ops Manager オブジェクトはPendingBACKUP状態を報告します。

このページを評価

項目一覧