Docs Menu
Docs Home
/ /
MongoDB Atlas Kubernetes Operator

AtlasBackupSchedule Custom Resource

On this page

  • Example
  • Parameters

The AtlasBackupSchedule custom resource configures a backup schedule that you can apply to your AtlasDeployment Custom Resource. When you create the AtlasBackupSchedule custom resource, Atlas Kubernetes Operator tries to create or update a backup schedule.


Custom Resources No Longer Delete Objects by Default

Atlas Kubernetes Operator uses custom resource configuration files to manage your Atlas configuration, but as of Atlas Kubernetes Operator 2.0, custom resources you delete in Kubernetes are no longer deleted in Atlas. Instead, Atlas Kubernetes Operator simply stops managing those resources. For example, if you delete an AtlasProject Custom Resource in Kubernetes, Atlas Kubernetes Operator no longer automatically deletes the corresponding project from Atlas, preventing accidental or unexpected deletions. To learn more, including how to revert this behavior to the default used prior to Atlas Kubernetes Operator 2.0, see New Default: Deletion Protection in Atlas Kubernetes Operator 2.0.

Atlas Kubernetes Operator does one of the following actions using the Atlas Cloud Backup Schedule API Resource:

  • Creates a new backup schedule.

  • Updates an existing backup schedule.

If you remove the AtlasBackupSchedule resource from your Kubernetes cluster, Atlas stops creating backups for your cluster.


You must do all of the following to back up a cluster:

  1. Create a backup policy

  2. Create a backup schedule and set the field to the name of the configured backup policy.

  3. Set the field in the AtlasDeployment Custom Resource to the name of the configured backup schedule.

To learn more, see Back Up Your Atlas Cluster.

You can specify one backup schedule per cluster, but you can use the same backup schedule for multiple clusters.

The following example shows an AtlasBackupSchedule custom resource configured to take snapshots at 10:10 UTC and restore up to two days:

kind: AtlasBackupSchedule
name: atlas-default-backupschedule
autoExportEnabled: true
- cloudProvider: AWS
regionName: US_EAST_1
shouldCopyOplogs: true
referenceHourOfDay: 10
referenceMinuteOfHour: 10
restoreWindowDays: 2
name: atlas-default-backuppolicy
namespace: mongodb-atlas-system

This section describes some of the key AtlasBackupSchedule custom 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.


Type: boolean


Flag that specifies whether Atlas automatically exports cloud backup snapshots to your AWS backup. Specify true to enable automatic export of cloud backup snapshots to the AWS bucket. Specify false to disable automatic export.


Type: array


List that contains a document for each copy setting item in the desired backup policy. Each copy setting item defines a snapshot distribution policy.


Type: object


Policy for automatically exporting cloud backup snapshots.


Type: string


Unique 24-hexadecimal character string that identifies the AWS bucket.


Type: string


Human-readable label that indicates the rate at which the export policy item occurs.


Type: number


Number that indicates the UTC hour of day between 0 and 23, inclusive, representing the hour of the day that Atlas takes snapshots for backup policy items.


Type: number


Number that indicates the minutes after spec.referenceHourOfDay that Atlas takes snapshots for backup policy items. Value must be between 0 59 inclusive.


Type: number


Number that indicates the days back in time that you can restore to with continuous cloud backup accuracy. Value must be a positive, non-zero integer.

This setting applies to continuous cloud backups only.


Type: array


List that contains the details for the backup policy to apply.

Type: string

Required value within thhe AtlasBackupPolicy Custom Resource for the backup policy that you want to apply. You can specify only one backup policy per backup schedule. You can't use the same backup policy in multiple backup schedules.


Type: string


String that indicates the namespace that contains the AtlasBackupPolicy Custom Resource for the backup policy that you want to apply.





On this page