注意
この機能は、次の配置では使用できません。
M0クラスターM2/M5クラスターFlex クラスター
注意
Atlas は M2 および M5 クラスターとサーバーレス インスタンスを非推奨にしました。2025 年 1 月 日現在、Atlas はすべての M2 クラスターと M5 クラスターを Flex クラスターに移行しました。サーバーレスインスタンスの場合、Atlas は使用状況に応じて、インスタンスを無料クラスター、Flex クラスター、または専有クラスターに移行するかどうかを決定し、すべてのサーバーレスインスタンスを自動的に移行しました。
22、2026 年 1 月 日現在、M2、M5、サーバーレスインスタンスのサポートは終了しました。これらの非推奨のクラスタータイプに関連する API は使用できなくなり、Flex クラスター用の API のみが引き続き使用されます。
3 月 2025 日現在、サーバーレスインスタンスのプライベートエンドポイントはサポートされなくなりました。Atlas Kubernetes Operator 構成からすべての M2、M5、およびサーバーレスインスタンス機能を削除します。
If your workloads require Private Endpoints or Continuous Backup, switch to Atlas Dedicated Clusters. To learn more, see Migration to Flex Clusters and the Atlas Flex Migration Guide.
Atlas Kubernetes Operator supports cloud backup for your Atlas clusters. Cloud backup uses the native snapshot capabilities of your cloud provider to support full-copy snapshots and localized snapshot storage.
Atlas Kubernetes Operator を使用してクラウドバックアップを管理するには、次のカスタム リソースを指定して更新できます。
カスタム リソース | 目的 |
|---|---|
バックアップの頻度やスナップショットの保持期間などのバックアップ ポリシーを定義します。 | |
Atlas がデータベース配置をバックアップする時刻、復元可能な日数、バックアップ ポリシーなどのバックアップ スケジュールを定義します。 | |
クラスターの特性を定義します。クラウドバックアップを有効にするには、backupRef.nameフィールドを構成されたバックアップスケジュールの名前に設定する必要があります。 さらに、 継続的なバックアップを構成するには、 pitEnabled を |
サポートされているカスタム リソースのいずれかを変更するたびに、Atlas Kubernetes Operator は対応する Atlas 構成を作成または更新します。
Considerations
次の考慮事項を検討します。
バックアップ スケジュールごとに 1 つのバックアップ ポリシーを指定できます。
クラスターごとに指定できるバックアップ スケジュールは 1 つですが、複数のクラスターで同じバックアップ スケジュールを使用することもできます。
Atlas determines the order of nodes to snapshot based on your cluster configuration. To learn more, see Cloud Backups.
Atlas Kubernetes Operator supports automatic snapshot distribution. You can configure this with the
spec.copySettingfield in theAtlasBackupScheduleCustom Resource.
注意
If you have a Backup Compliance Policy enabled, you can't modify the backup policy for an individual cluster below the minimum requirements set in the Backup Compliance Policy. You can modify the cluster-level backup policy at any time. Atlas augments any preexisting cluster-level policies to meet the minimum requirements of the Backup Compliance Policy. All new clusters use the Backup Compliance Policy. If you reduce the frequency of a backup schedule, the change applies only to future backups. Any existing oplog remains for the original window. The minimum requirements of the Backup Compliance Policy apply. You can configure extra snapshot retention. You can also view backup details for all M10+ dedicated clusters including deleted clusters with retained snapshots. To learn more, see View Backup Details for Dedicated Clusters.
制限
Certain limitations apply to cloud backup. To learn more, see Back Up Your Cluster.
前提条件
Atlas Kubernetes Operator が管理するクラスターのクラウドバックアップを有効にするには、次の手順を実行する必要があります。
Atlas Kubernetes Operatorが配置された実行中の Kubernetes クラスターを用意します。
IPアドレスが組織のAPIアクセス リストにあることを確認します。
手順
Atlas Kubernetes Operator が管理するクラスターのクラウドバックアップを有効にするには、次の手順に従います。
バックアップ ポリシーを作成します。
バックアップ ポリシーのパラメータの詳細については、「 AtlasBackupPolicyカスタム リソース 」を参照してください。
例:
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasBackupPolicy metadata: name: "atlas-default-backuppolicy" spec: items: frequencyType: "weekly" frequencyInterval: 1 retentionUnit: "days" retentionValue: 7 EOF
バックアップ スケジュールを作成します。
spec.policy.name フィールドに、AtlasBackupPolicy カスタム リソース の metadata.name を指定してバックアップポリシーを適用する。
バックアップ スケジュールのその他のパラメータの詳細については、「 AtlasBackupScheduleカスタム リソース 」を参照してください。
例:
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasBackupSchedule metadata: name: "atlas-default-backupschedule" spec: autoExportEnabled: true copySettings: - cloudProvider: AWS frequencies: - HOURLY regionName: US_EAST_1 shouldCopyOplogs: true referenceHourOfDay: 10 referenceMinuteOfHour: 10 restoreWindowDays: 2 policy: name: atlas-default-backuppolicy namespace: mongodb-atlas-system EOF
クラスターにバックアップ スケジュールを適用します。
AtlasDeploymentカスタム リソースの spec.backupRef.name フィールドに、metadata.name AtlasBackupScheduleカスタム リソースの を指定してバックアップ予定をクラスターに適用します。
例:
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasDeployment metadata: name: my-atlas-cluster spec: backupRef: name: atlas-default-backupschedule namespace: mongodb-atlas-system EOF