Restore from a Locally-Downloaded Snapshot
Atlas provides a mechanism for downloading dedicated cluster, shared cluster, and legacy backup snapshots as compressed files.
Atlas deletes all existing data on the target cluster prior to the restore. The target cluster is available for the duration of the restore.
Download Considerations
If your manual download of a backup snapshot fails, Atlas keeps the request alive and allows you to restart the backup as long as the most recent download failure occurred no more than one hour ago.
For Atlas clusters deployed on AWS or Azure, if you configured any private endpoints, Atlas allows you to download the snapshot over the private endpoints in the same region as the snapshot. You might incur charges for downloading the snapshot over the private endpoint. To learn more, see Private Endpoints.
Restore Considerations
In addition to the prerequisites, consider the following requirements and limitations when restoring from a locally-downloaded snapshot.
If the
DefaultRWConcern
value on the source snapshot differs from theDefaultRWConcern
value on the target cluster, Atlas overrides the value on the source snapshot with the value on the target cluster. If there is no value configured for theDefaultRWConcern
on the target cluster, 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.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.
Required Access
To download a backup snapshot, you must have Project Owner
access or higher to the project.
Procedure
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.
Request your snapshot.
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. For AWS or Azure, Atlas also generates a one-time-use download link for any configured private endpoints in the same region as the snapshot.
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. The
Atlas Administration API returns the download link in the
deliveryUrl
field for downloading over the public internet
and in the privateDownloadDeliveryUrls
field for downloading
over the private endpoint in the same region as the
snapshot.
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.
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.
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. To learn more, see Start mongod Processes.Example
The following command starts a
mongod
instance using the extracted data file directory:mongod --dbpath ~/Downloads/mongodb-snapshots/my-cluster-snapshot/