Docs Menu

Docs HomeLaunch & Manage MongoDBMongoDB Atlas

Manage Backup Policies

On this page

  • Required Access
  • View Backup Policies
  • In Atlas, go to the Database Deployments page for your project.
  • Go to the Backup page for your cluster.
  • Click Backup Policy.
  • Change the Backup Policy Time
  • Configure Your Backup Policy
  • Configure the Restore Window
  • Configure Extra Snapshot Retention
  • Snapshot Retention Considerations

You can view and customize Atlas policies for regularly scheduled, automated backups.

To take backup snapshots outside your schedule, see Take On Demand Snapshots

To view backup policies, you must have Project Read Only access to the project. Users with Organization Owner access must add themselves as a Project Owner to the project before they can view backup policies.

To modify or delete backup policies, you must have Project Owner access to the project. Users with Organization Owner access must add themselves as a Project Owner to the project before they can modify or delete backup policies.

A backup policy has the following sections:

  • A time of day, in UTC, at which to create snapshots.

  • A frequency interval and duration of retention.

  • If PIT Restores are enabled, a PIT window that allows you to restore to any point in time in the last X days where X is the window.

Example

The default backup policy specifies a snapshot time of 18:00 UTC and the following four policy items:

Policy Type
Tier
Continuous Cloud Backup
Snapshot Taken
Snapshot Retained
Hourly

NVMe

Enabled
Every 12 hours
2 days
Hourly
non-NVMe
Enabled
Every 6 hours
2 days
Daily
All
Either
Every day
7 days
Weekly
All
Either
Every Saturday
4 weeks
Monthly
All
Either
Last day of the month
12 months
Yearly
All
Either
Every 1st of December
1 year

To learn more about Cloud Backup billing, see Cloud Backups.

Note

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.

Each row in the Backup Policy Frequency and Retention table represents a backup policy item. Configure the policy items and, optionally, add new policy items to configure a new backup policy. See the retention considerations before finalizing your backup policy.

Tip

Atlas displays the estimated number of snapshots associated with your changes below the Backup Policy Frequency and Retention table.

To specify a backup policy item using the Atlas UI:

  1. Select the frequency unit from Frequency Unit for a policy item.

    Alternatively, click Add Frequency Unit to add a new policy item to your backup policy. You can't specify multiple Hourly or Daily backup policy items.

    Note

    If you have a Backup Compliance Policy enabled, only MongoDB support can delete policy items specified in the Backup Compliance Policy. To delete policy items specified in the Backup Compliance Policy, you must request support and complete an extensive verification process.

  2. Select the frequency for the frequency unit from Every.

  3. Specify the retention time for the policy item in Retention Time and the units for the retention time from the list to the right. To learn more, see Snapshot Retention Considerations.

  4. (Optional) To apply the retention changes in the updated backup policy to snapshots that Atlas took previously, check Apply policy retention changes to existing snapshots.

    Note

    This option affects only snapshots created by the updated policy items and whose retention has not been updated individually with the Update Cloud Backup Schedule for One Cluster API call.

  5. Click Save Changes.

Note

If you have a Backup Compliance Policy enabled, only MongoDB support can reduce the Continuous Cloud Backup Restore Window. To reduce the Continuous Cloud Backup Restore Window, the security or legal representative specified for the Backup Compliance Policy must request support and complete an extensive verification process.

You can replay the oplog to restore a cluster from any point in time within a specified restore window.

To specify the restore window duration, select how long you want Atlas to retain the oplog for point-in-time restores from the Restore Window list.

You can't configure a restore window that is longer than the Hourly Snapshot Retention Time.

Important

If you disable Cloud Backups for a cluster or terminate a cluster that had snapshots enabled, Atlas immediately deletes the backup snapshots for that cluster unless the Keep existing snapshots after termination option is enabled. To learn more, see Terminate One Deployment. For clusters not using Encryption at Rest using Customer Key Management you can download the latest snapshot to preserve any data stored in the cluster.

When a Backup Compliance Policy is enabled for your project, you can also configure extra snapshot retention to retain snapshots beyond the Backup Compliance Policy protection period. Your snapshots remain fully protected and users can't delete them during the Backup Compliance Policy period. During the extra snapshot retention period, snapshots are unprotected again and any user with the appropriate role can delete them. When the extra snapshot retention period ends, Atlas deletes the snapshots automatically. Any changes apply to all existing and future snapshots for that frequency unit. The extra snapshot retention time remains the same even if the Backup Compliance Policy changes.

To learn more, see Configure a Backup Compliance Policy.

To specify extra snapshot retention using the Atlas UI:

  1. In the Extra Snapshot Retention section, select the frequency unit from the Frequency Unit dropdown.

    Alternatively, click Add Frequency Unit to add extra snapshot retention for another frequency unit.

  2. Specify the extra snapshot retention time for each frequency unit.

  3. Click Save Changes.

In addition to the Retention Time you define for each Cloud Backup frequency unit, be aware of the following:

  • If you delete an existing backup frequency unit, the snapshots for which you specified that frequency remain intact until they expire or you delete them.

  • Atlas requires the following:

    • The retention time must be equal to or longer than the frequency unit. For example, the retention time for weekly snapshot must be one week or greater.

    • The value specified for Retention Time for items that are less frequent must be equal to or larger than the value specified for items that are more frequent. For example, if the hourly policy item specifies a retention of two weeks, the retention for the weekly snapshot must be two weeks or greater.

  • If you have a Backup Compliance Policy enabled, you can't decrease the retention time for a snapshot after it's taken.

  • If overlapping policy items generate the same snapshot, Atlas associates the snapshot with the policy item with the longest retention time.

    Example

    The policy specifies a daily snapshot with two-day retention and a weekly snapshot every Saturday with three-week retention. Since the retention time for the weekly policy item is longer than that specified for the hourly policy item, Atlas displays a frequency of Weekly in the Frequency column on the Snapshots page for the snapshot taken on Saturday and retains it for three weeks.

← Backup Scheduling, Retention, and On-Demand Snapshots