AtlasBackupPolicy custom resource configures a backup policy
that applies to the
AtlasBackupSchedule Custom Resource that you
can apply to your
AtlasDeployment Custom Resource. When you
AtlasBackupPolicy custom resource, Atlas Kubernetes Operator tries to
create or update a backup policy.
Custom Resources Definitions Take Priority
Atlas Kubernetes Operator uses custom resource configuration files to manage your Atlas configuration. Each custom resource definition overrides settings specified in other ways such as in the Atlas UI. If you delete a custom resource, Atlas Kubernetes Operator deletes the object from Atlas unless you use annotations to skip deletion. To learn more, see the Create and Update Process and the Delete Process.
Atlas Kubernetes Operator does one of the following actions using the Atlas Cloud Backup Schedule API Resource:
Creates a new backup policy.
Updates an existing backup policy.
If you remove the
AtlasBackupPolicy resource from your Kubernetes
cluster, Atlas stops creating backups for your cluster.
You must do all of the following tasks to back up a cluster:
Create a backup policy.
To learn more, see Back Up Your Atlas Cluster.
The following example shows an
AtlasBackupPolicy custom resource
that is configured to take snapshots weekly and retain snapshots for
apiVersion: atlas.mongodb.com/v1 kind: AtlasBackupPolicy metadata: name: "atlas-default-backuppolicy" labels: app.kubernetes.io/version: 1.6.0 spec: items: - frequencyType: "weekly" frequencyInterval: 1 retentionUnit: "days" retentionValue: 7
This section describes some of the key
resource parameters available. For a full list of parameters available,
see the Atlas
Modify Cloud Backup Backup Policy API. Refer
to these descriptions, the available examples, and the API
documentation to customize your specifications.
List that contains the policy item parameters from the API. For a full list of parameters available, see the Atlas Modify Cloud Backup Backup Policy API.
Number that indicates the desired frequency of the new backup policy item specified by
spec.items.frequencyType. A value of
1specifies the first instance of the corresponding
In a monthly policy item,
1indicates that the monthly snapshot occurs on the first day of the month.
In a weekly policy item,
1indicates that the weekly snapshot occurs on Monday.
This setting accepts the following frequency values:
1is Monday and
1is the first day of the month and
40is the last day of the month.
String that indicates the frequency associated with the backup policy item. Accepted values are:
You can't specify multiple
dailybackup policy items.
String that indicates the scope of the backup policy item. Together with
spec.items.retentionValue, these settings define the length of time to retain snapshots. Accepted values are: