Manage Backup Policies
On this page
You can view and customize Atlas policies for regularly scheduled, automated backups.
To take backup snapshots outside your schedule, see Take On Demand Snapshots
Required Access
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 Read Only
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.
View Backup Policies
To return the details of the backup policy for the cluster you specify using the Atlas CLI, run the following command:
atlas backups schedule describe <clusterName> [options]
To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas backups schedule describe.
Use the Backup Policy Editor to configure a backup policy for Cloud Backups.
In Atlas, go to the Clusters page for your project.
If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
If it's not already displayed, click Clusters in the sidebar.
The Clusters page displays.
Go to the Backup page for your cluster.
Click your cluster's name.
Click the Backup tab.
If the cluster has no Backup tab, then Atlas backups are disabled for that cluster and no snapshots are available. You can enable backups when you scale the cluster.
The Backup page displays.
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.
Change the Backup Policy Time
To update the backup policy for the cluster you specify using the Atlas CLI, run the following command:
atlas backups schedule update [options]
To delete the backup policy for the cluster you specify using the Atlas CLI, run the following command:
atlas backups schedule delete <clusterName> [options]
To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas backups schedule update and atlas backups schedule delete.
To modify the backup policy time:
In the Backup Policy Editor, select the hour which Atlas takes a snapshot each day from hr beneath Snapshot Time (UTC).
Select the number of minutes after hr at which Atlas takes a snapshot from min beneath Snapshot Time (UTC).
Click Save Changes.
Configure Your Backup Policy
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:
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.
Select the frequency for the frequency unit from Every.
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.
(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.
Click Save Changes.
Configure the Restore Window
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.
Configure Extra Snapshot Retention
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:
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.
Specify the extra snapshot retention time for each frequency unit.
Click Save Changes.
Snapshot Retention Considerations
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.
For example, if the policy speficies a daily snapshot with two-day retention and a weekly snapshot every Saturday with three-week retention, then Atlas displays a frequency of Weekly in the Frequency column on the Snapshots page for the snapshot taken on Saturday and retains the snapshot for three weeks. This is because the weekly policy item has a longer retention time than the daily policy item.