Docs Menu

Export Cloud Backup Snapshot

On this page

  • How Atlas Exports Snapshots
  • Exported Data Format
  • Limitations
  • Pre-requisites
  • Export Management
Note
Feature unavailable in Free and Shared-Tier Clusters

This feature is not available for M0 free clusters, M2, and M5 clusters. To learn more about which features are unavailable, see Atlas M0 (Free Cluster), M2, and M5 Limitations.

Atlas lets you export your Cloud Backup snapshots to an AWS S3 bucket.

You can manually export individual snapshots or set up an export policy for automatic export of your snapshots. For automatic exports, you must specify a frequency in your export policy. Atlas automatically exports any snapshot that matches this frequency.

Atlas exports snapshots for collections one at a time. As the export progresses, you may see partial results in your S3 bucket. Atlas queues any new job if Atlas is currently exporting 5 or more replica sets. For sharded clusters, Atlas always exports the snapshots of all the shards simultaneously, regardless of the number of shards.

After Atlas finishes exporting, Atlas uploads a metadata file named .complete in the following path on your S3 bucket:

/exported_snapshots/<orgName>/<projectName>/<clusterName>/<initiationDateOfSnapshot>/<timestamp>/
Note

Atlas replaces any spaces with underscores (_) and removes any characters that might require special handling and characters to avoid from the organization and project names in the path.

The .complete metadata file is in JSON format and contains the following fields:

Field
Description
orgId
Unique 24-hexadecimal digit string that identifies the Atlas organization.
orgName
Name of the Atlas organization.
groupId
Unique 24-hexadecimal digit string that identifies the project in the Atlas organization.
groupName
Name of the Atlas project.
clusterUniqueId
Unique 24-hexadecimal digit string that identifies the Atlas cluster.
clusterName
Name of the Atlas project.
snapshotInitiationDate
Date when snapshot was taken.
totalFiles
Total number of files uploaded to the S3 bucket.
labels
Labels of the cluster whose snapshot was exported.
customData
Custom data, if any, that you specified when creating the export job.
Example
{
"orgId": "60512d6f65e4047fe0842095",
"orgName": "org1",
"groupId": "60512dac65e4047fe084220f",
"groupName": "group1",
"clusterUniqueId": "60512dac65e4047fe0842212",
"clusterName": "cluster0",
"snapshotInitiationDate": "2020-04-03T05:50:29.321Z"
"totalFiles": 23,
"labels": [
{
"key": "key1",
"value": "xyz"
},
{
"key": "key2",
"value": "xyzuio"
}
],
"customData": [
{
"key": "key1",
"value": "xyz"
},
{
"key": "key2",
"value": "xyzuio"
}
]
}

If an export job fails:

  • Atlas doesn't automatically try to export again.
  • Atlas doesn't remove any partial data in your S3 bucket.

Atlas uploads the contents of your database to S3 in .json.gz format with documents in extended JSON format within. The path to the files on S3 is:

/exported_snapshots/<orgName>/<projectName>/<clusterName>/<initiationDateOfSnapshot>/<timestamp>/<dbName>/<collectionName>/<shardName>.<increment>.json.gz

Where:

<orgName>
Name of your Atlas organization.
<projectName>
Name of your Atlas project.
<clusterName>
Name of your Atlas cluster.
<initiationDateOfSnapshot>
Date when snapshot was taken.
<timestamp>
Timestamp when the export job was created.
<dbName>
Name of the database in the Atlas cluster.
<collectionName>
Name of the Atlas collection.
<shardName>
Name of the replica set.
<increment>
Count that is incremented as chunks are uploaded. Starts at 0.

The following limitations apply:

  • You can only export to AWS S3 buckets.
  • You can't export fallback snapshots.
  • You can have only one active export per snapshot.

To export your Cloud Backup snapshots to an AWS S3 bucket, you will need the following:

  1. M10 or higher Atlas cluster with Cloud Backup enabled.
  2. AWS IAM role with STS:AssumeRole that grants Atlas access to your AWS resources. To learn more about configuring AWS access for Atlas, see Set Up Unified AWS Access.
  3. AWS IAM role policy that grants Atlas write access or the S3:PutObject and S3:GetBucketLocation permissions to your AWS resources. To learn more about configuring write access to AWS resources, see Set Up Unified AWS Access.

Use the following APIs to:

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.