Docs Menu

Docs HomeAtlas CLI

Cloud Backup Schedule Configuration File

On this page

  • Cloud Backup Schedule Settings
  • Example Cloud Backup Schedule Configuration File

You can use a cloud backup schedule configuration file to specify the settings required when you update a cloud backup schedule using the Atlas CLI. The Atlas CLI accepts .json cloud backup schedule configuration files.

You can specify the following settings to update a cloud backup schedule either in the configuration file or as flags in the command:

Field
Type
Description
autoExportEnabled
boolean
Flag that indicates whether Atlas automatically exports cloud backup snapshots to the AWS bucket.
copySettings
array
List that contains a document for each copy setting item in the desired backup policy.
copySettings.
cloudProvider
string
Human-readable label that identifies the cloud provider that stores the snapshot copy.
copySettings.
frequencies
array of strings
List that describes which types of snapshots to copy.
copySettings.
regionName
string
Target Atlas region to copy snapshots belonging to replicationSpecId to. Please supply the Atlas Region that corresponds to your AWS, GCP or Azure region.
copySettings.
replicationSpecId
string
Unique 24-hexadecimal digit string that identifies the replication object for a zone in a cluster. For global clusters, there can be multiple zones to choose from. For sharded clusters and replica set clusters, there is only one zone in the cluster. To find thereplicationSpecId, do a GET request to Return One Cluster in One Project and consult its replicationSpecs array.
copySettings.
shouldCopyOplogs
boolean
Flag that indicates whether to copy the oplogs to the target region. You can use the oplogs to perform point-in-time restores.
deleteCopiedBackups
array
List that contains a document for each copy setting item in the desired backup policy.
deleteCopiedBackups.
cloudProvider
string
Human-readable label that identifies the cloud provider for the deleted copy setting whose backup copies you want to delete.
deleteCopiedBackups.
regionName
string
Target Atlas region to copy snapshots belonging to replicationSpecId to. Please supply the Atlas Region that corresponds to your AWS, GCP or Azure region.
deleteCopiedBackups.
replicationSpecId
string
Unique 24-hexadecimal digit string that identifies the replication object for a zone in a cluster. For global clusters, there can be multiple zones to choose from. For sharded clusters and replica setclusters, there is only one zone in the cluster. To find thereplicationSpecId, do a GET request to Return One Cluster in One Project and consult its replicationSpecs array.
export
object
List that contains a document for each copy setting item in the desired backup policy.
export.
exportBucketId
string
Unique 24-hexadecimal character string that identifies the AWS Bucket.
export.
frequencyType
string
Human-readable label that indicates the rate at which the export policy item occurs.
policies
array
Rules set for this backup schedule.
policies.
id
string
Unique 24-hexadecimal digit string that identifies this backup policy.
policies.
policyItems
array
List that contains the specifications for one policy.
policies.
policyItems.
frequencyInterval
integer

Number that indicates the frequency interval for a set of snapshots. A value of 1 specifies the first instance of the corresponding frequencyType.

  • In a monthly policy item, 1 indicates that the monthly snapshot occurs on the first day of the month and 40 indicates the last day of the month.

  • In a weekly policy item, 1 indicates that the weekly snapshot occurs on Monday and 7 indicates Sunday.

  • In an hourly policy item, you can set the frequency interval to 1, 2, 4, 6, 8, or 12. For hourly policy items for NVMe clusters, Atlas only accepts 12 as the frequency interval value.

policies.
policyItems.
frequencyType
string
Human-readable label that identifies the frequency type associated with the backup policy.
policies.
policyItems.
retentionUnit
string
Unit of time in which Atlas measures snapshot retention.
policies.
policyItems.
retentionValue
integer

Duration in days, weeks, or months that Atlas retains the snapshot. For less frequent policy items, Atlas requires that you specify a value greater than or equal to the value specified for more frequent policy items.

For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.

referenceHourOfDay
integer
Hour of day in Coordinated Universal Time (UTC) that represents when Atlas takes the snapshot.
referenceMinuteOfHour
integer
Minute of the referenceHourOfDay that represents when Atlas takes the snapshot.
restoreWindowDays
integer
Number of previous days that you can restore back to with continuous cloud backup accuracy. You must specify a positive, non-zero integer. This parameter applies to continuous cloud backups only.
updateSnapshots
boolean
Flag that indicates whether to apply the retention changes in the updated backup policy to snapshots that Atlas took previously.
useOrgAndGroupNamesInExportPrefix
boolean
Flag that indicates whether to use organization and project names instead of organization and project UUIDs in the path to the metadata files that Atlas uploads to your AWS bucket.

To update a cloud backup schedule for a single cluster, specify the fields you want to update as shown in the following example file:

{
"autoExportEnabled": true,
"copySettings": [
{
"cloudProvider": "AWS",
"frequencies": [
"HOURLY"
],
"regionName": "US_EAST_1",
"replicationSpecId": "24a7bf81d1ea39035acf7b8e3",
"shouldCopyOplogs": true
}
],
"deleteCopiedBackups": [
{
"cloudProvider": "GCP",
"regionName": "CENTRAL_US",
"replicationSpecId": "49c1b72a1ad50263cfa2a3d8"
}
],
"export": {
"exportBucketId": "62c569f85b7a381c093cc539",
"frequencyType": "monthly"
},
"policies": [
{
"id": "62da8faac84a2721e448d767",
"policyItems": [
{
"frequencyInterval": 6,
"frequencyType": "hourly",
"retentionUnit": "days",
"retentionValue": 7
}
]
}
],
"referenceHourOfDay": 0,
"referenceMinuteOfHour": 0,
"restoreWindowDays": 0,
"updateSnapshots": true,
"useOrgAndGroupNamesInExportPrefix": true
}
←  Cluster Configuration FileAtlas Data Federation Configuration File →