Restore from a Locally-Downloaded Snapshot
On this page
Atlas provides a mechanism for downloading dedicated cluster, shared cluster, and legacy backup snapshots as compressed files.
Restore Considerations
In addition to the prerequisites, consider the following requirements and limitations when restoring from a locally-downloaded snapshot.
You must have the
Project Owner
role for the Atlas projects that contain the source and target database deployments to restore data from one Atlas database deployment to another.If the
DefaultRWConcern
value on the source snapshot differs from theDefaultRWConcern
value on the target database deployment, Atlas overrides the value on the source snapshot with the value on the target database deployment. If there is no value configured for theDefaultRWConcern
on the target database deployment, Atlas keeps the value ofDefaultRWConcern
from the snapshot without explicit configuration. This may differ from the default value for that MongoDB version.
This feature is unavailable for
M0
clusters and for serverless instances.The downloaded files consist of the raw files copied from the
data
directory.mongorestore
is incompatible with these files. To access the data files, use the following procedure to start amongod
instance and point it to the extract directory.
Procedure
Important
Atlas deletes all existing data on the target database deployment prior to the restore. Depending on the type of restore taking place, the target cluster may be unavailable for the duration of the restore.
Considerations
When you manually download a cloud backup snapshot, your download might get interrupted for some reason. Atlas keeps the request alive and allows you to restart it as long as the most recent download failure occurred no more than one hour ago.
Request your snapshot.
Click Database.
Click the name of your Atlas Cluster.
Click the Backup tab.
Click the Snapshots sub-tab.
In the Actions column, expand the Actions menu, and click Download for the snapshot that you want to download.
Atlas generates a one-time use download link that expires within 1 hour after its creation.
The amount of time to create this link increases with the size of the Atlas cluster.
Once the download is ready, Atlas:
Emails you an alert that your snapshot download is ready.
Displays the download link in the Restores & Downloads tab.
Note
Available via API
As another option, you can request a restore snapshot using the API.
Add the IP or CIDR address of the client to your Atlas project IP access list.
If the current project IP access list ranges do not cover the target client IP or CIDR address, click Add or Modify your IP Addresses to make changes to your Atlas project IP access list.
Use your preferred archive utility to extract the archive and access the data files.
Atlas compresses the snapshot into a .tar.gz
file. This
archive includes the snapshot and the mongod
logs.
Extract the files in the archive.
Example
The following command uses the
tar
utility to extract atar``archive with ``gzip
compression.tar -xvzf ~/Downloads/mongodb-snapshots/my-cluster-snapshot.tar.gz Access the data files by starting a
mongod
instance on the host and pointing it at the extract directory using the--dbpath
option.Example
The following command starts a
mongod
instance using the extracted data file directory:mongod --dbpath ~/Downloads/mongodb-snapshots/my-cluster-snapshot/