对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

AtlasBackupCompliancePolicy 自定义资源

The AtlasBackupCompliancePolicy custom resource configures a Backup Compliance Policy that applies to the AtlasProject Custom Resource to protect your backup data. When you create the AtlasBackupCompliancePolicy custom resource, Atlas Kubernetes Operator tries to create or update a Backup Compliance Policy.

Atlas Kubernetes Operator does one of the following actions using the Atlas Backup Compliance Policy API Resource:

  • 创建新的备份合规策略。

  • 更新现有备份合规性策略。

重要

请参阅“禁止的操作和注意事项” 。 备份合规策略作为最低备份策略应用于项目中的所有集群。 备份合规策略可保护所有现有快照。 备份合规策略可防止任何用户(无论角色如何)在现有快照过期之前修改或删除它们。 对此备份合规性策略所做的更改仅应用于未来的快照。 如果启用备份合规策略,则备份合规策略会限制您降低备份存储成本的能力。 您无法通过调整保留或删除备份来降低备份存储成本。

以下示例显示了一个BackupCompliancePolicy自定义资源。 要学习;了解详情,请参阅配置备份合规策略。

apiVersion: atlas.mongodb.com/v1
kind: AtlasBackupCompliancePolicy
metadata:
name: my-backup-compliance-policy
namespace: mongodb-atlas-system
spec:
authorizedEmail: john.doe@example.com
authorizedUserFirstName: John
authorizedUserLastName: Doe
copyProtectionEnabled: false
encryptionAtRestEnabled: false
onDemandPolicy:
retentionUnit: weeks
retentionValue: 3
overwriteBackupPolicies: false
pointInTimeEnabled: true
restoreWindowDays: 42
scheduledPolicyItems:
- frequencyInterval: 2
frequencyType: daily
retentionUnit: days
retentionValue: 7

本部分介绍一些可用的关键BackupCompliancePolicy自定义资源参数。 有关可用参数的完整列表,请参阅Atlas更新或启用备份合规性策略设置API 。 请参阅这些描述、可用示例和API文档,自定义您的规范。

spec.authorizedEmail

类型:字符串

必需

授权证券或法定代表人的电子邮件解决。

重要

无效或不正确的电子邮件地址会阻止您修改或启用此备份合规性策略,直到您通过 MongoDB 支持予以更正。

spec.authorizedUserFirstName

类型:字符串

必需

授权证券或法定代表人的名字。

spec.authorizedUserLastName

类型:字符串

必需

授权证券或法定代表人的姓氏。

spec.copyProtectionEnabled

类型:布尔值

Optional

Flag that indicates whether to keep all snapshots when removing additional snapshot regions. This parameter defaults to false.

注意

You can prevent cluster users from deleting backups copied to other regions even if you change this parameter to false. To learn more, see Copy Snapshots to Additional Regions.

spec.encryptionAtRestEnabled

类型:布尔值

Optional

指示是否要求使用客户数密钥管理对所有集群进行静态加密的标志。 此参数默认为false 。

注意

To enable this option, you must Enable Encryption at Rest for all current clusters. You can't enable this option on paused clusters that don't have Encryption at Rest enabled.

spec.onDemandPolicy

类型:对象

Optional

包含按需快照策略项设置的对象。

spec.onDemandPolicy.frequencyInterval

类型:数字

必需

Number that indicates the desired frequency of the policy item specified by spec.onDemandPolicy.frequencyType. A value of 1 specifies the first instance of the corresponding spec.onDemandPolicy.frequencyType.

例子

  • 在月度备份合规策略中, 1表示月度快照发生在该月的第一天。

  • 在每周备份合规策略中, 1表示每周快照发生在星期一。

此设置接受以下频率值:

  • 每小时: 1 、 2 、 4 、 6 、 8和12 。

  • 每日: 1 。

  • 每周: 1到7 ,其中1为星期一, 7为星期日。

  • 每月: 1到28和40 ,其中1是该月的第一天, 40是该月的最后一天。

spec.onDemandPolicy.frequencyType

类型:字符串

必需

string ,表示与策略项关联的频率。 接受的值为: hourly 、 daily 、 weekly或monthly 。

注意

您不能在 onDemandPolicy 上指定多个hourly和daily备份策略。

spec.onDemandPolicy.retentionUnit

类型:字符串

必需

String that indicates the scope of the policy item. Together with spec.onDemandPolicy.retentionValue, these settings define the length of time to retain snapshots. Accepted values are: days, weeks, or months.

spec.onDemandPolicy.retentionValue

类型:字符串

必需

String that indicates the value to associate with spec.onDemandPolicy.retentionUnit. Together with spec.onDemandPolicy.retentionUnit, these settings define the length of time to retain snapshots.

spec.overwriteBackupPolicies

类型:布尔值

必需

标志,用于指示是否升级项目中的所有备份策略,而无论AtlasBackupPolicy自定义资源中的指定内容如何。

重要

如果您将此参数设立为true , Atlas都会升级项目中的所有备份策略,无论AtlasBackupPolicy自定义资源中指定了什么内容。 Atlas覆盖AtlasBackupPolicy自定义资源,并将该自定义资源的状态更新为Ready: False 。 您必须手动更新AtlasBackupPolicy自定义资源,以与备份合规策略保持一致。

如果将此参数设立为false ,则如果现有备份策略不满足备份合规性策略,则创建备份合规性策略将失败。

spec.pitEnabled

类型:布尔值

Optional

指示是否需要对所有集群进行时间点恢复的标志。 此参数默认为false 。

spec.restoreWindowDays

类型:数字

可选的

Number of days in the restore window for point in time restore. If you set spec.pitEnabled to true, you must specify this parameter.

重要

You can't configure a restore window that is longer than the Hourly Snapshot Retention Time. After you save this Backup Compliance Policy, you can't change this setting without MongoDB support. To change this setting, the security or legal representative specified for the Backup Compliance Policy must request support and complete an extensive verification process.

spec.scheduledPolicyItems

类型:对象

Optional

包含快照策略项设置的对象。

spec.scheduledPolicyItems.frequencyInterval

类型:数字

必需

Number that indicates the desired frequency of the policy item specified by spec.scheduledPolicyItems.frequencyType. A value of 1 specifies the first instance of the corresponding spec.scheduledPolicyItems.frequencyType.

例子

  • 在月度备份合规策略中, 1表示月度快照发生在该月的第一天。

  • 在每周备份合规策略中, 1表示每周快照发生在星期一。

此设置接受以下频率值:

  • 每小时: 1 、 2 、 4 、 6 、 8和12 。

  • 每日: 1 。

  • 每周: 1到7 ,其中1为星期一, 7为星期日。

  • 每月: 1到28和40 ,其中1是该月的第一天, 40是该月的最后一天。

spec.scheduledPolicyItems.frequencyType

类型:字符串

必需

string ,表示与策略项关联的频率。 接受的值为: hourly 、 daily 、 weekly或monthly 。

注意

您不能指定多个hourly和daily备份策略 ScheduledPolicyItems。

spec.scheduledPolicyItems.retentionUnit

类型:字符串

必需

String that indicates the scope of the policy item. Together with spec.scheduledPolicyItems.retentionValue, these settings define the length of time to retain snapshots. Accepted values are: days, weeks, or months.

spec.scheduledPolicyItems.retentionValue

类型:字符串

必需

String that indicates the value to associate with spec.scheduledPolicyItems.retentionUnit. Together with spec.scheduledPolicyItems.retentionUnit, these settings define the length of time to retain snapshots.

给本页内容打分

在此页面上