Navigation
  • Restoration >
  • Restore a Cluster from an M2/M5 Snapshot

Restore a Cluster from an M2/M5 Snapshot

|service| lets you restore data from an M2 or M5 cluster snapshot. You can restore M2 and M5 snapshots to a cluster of size M2 or greater.

Restore Restrictions

  • |service| can only restore M2 and M5 snapshots to a replica set that does not use Encryption at Rest.
  • The target cluster must run the same major release version of MongoDB as the snapshot MongoDB version. For example, you can only restore a snapshot using MongoDB 4.0 to a target cluster running MongoDB 4.0.

Prerequisites

  1. You must ensure that the target |service| cluster does not receive client requests during restoration. You must either:
    • Restore to a new |service| cluster and reconfigure your application to use that new cluster once the new deployment is running, or
    • Ensure that the target |service| cluster cannot receive client requests while you restore data.
  2. To download your snapshot via HTTPS, you must add the |ipaddr| or |cidr| addresses of the client downloading the snapshot to your |service| project whitelist.

Procedure

  1. From the Clusters view, click the cluster name.
  2. Click the Backup tab.
  3. Find the desired cluster snapshot to restore.
  4. For the desired cluster, click Restore or Download.
  5. Follow the prompts to restore your cluster. You may choose to:

Download your Snapshot via |https|

  1. In the Snapshots tab, locate the snapshot you wish to download in the All Daily Snapshots table.
  2. In the Actions column of the table, click Download.
  3. In the Download prompt, click either Copy Link or Download to download the snapshot.
    • When you click Copy Link, |service| generates a download link that expires within 4 hours. You can use this link multiple times prior to its expiration.
    • When you click Download, the download process begins immediately.

|service| compresses the snapshot into a .tar.gz file. Use your preferred archive utility to extract the archive and access the data files.

Once extracted, you can 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 uses the tar utility to extract a tar archive with gzip compression:

tar -xvzf ~/Downloads/mongodb-snapshots/my-cluster-snapshot.tar.gz

The following command starts a mongod instance using the extracted data file directory:

mongod --dbpath ~/Downloads/mongodb-snapshots/my-cluster-snapshot/

Restore your Snapshot to an |service| Cluster

Important

|service| deletes all existing data on the target cluster prior to the restore. The cluster will be unavailable for the duration of the restore.

You can restore to any |service| cluster in a project for which you have the Project Owner role.

  1. In the Snapshots tab, locate the snapshot you wish to restore in the All Daily Snapshots table.
  2. In the Actions column of the table, click Restore.
  3. From the Restore dialog, select the target cluster to which you want to restore.
  4. Click Restore.

#. Restart your application and ensure it uses the new target cluster. .. include:: /includes/hash.rst .. _service-fullname: https://www.mongodb.com/cloud/atlas?jmp=docs .. _service-pricing: https://www.mongodb.com/cloud/atlas/pricing?jmp=docs .. _service: https://www.mongodb.com/cloud/atlas?jmp=docs .. _stitch-docs: https://docs.mongodb.com/stitch .. |2fa| replace:: 2FA .. |a-service| replace:: an Atlas .. |A-service| replace:: An Atlas .. |aki| replace:: AKI .. |akv| replace:: AKV .. |api| replace:: API .. |arn| replace:: ARN .. |aws| replace:: AWS .. |azure| replace:: Azure .. |bic-full| replace:: MongoDB Connector for BI .. |bic-official| replace:: MongoDB Connector for Business Intelligence for Atlas .. |bic-short| replace:: BI Connector .. |bic| replace:: BI Connector for Atlas .. |bson| replace:: BSON .. |certauth| replace:: Certificate Authority .. |cidr| replace:: CIDR .. |cifs| replace:: CIFS .. |cmk| replace:: CMK .. |compass| replace:: MongoDB Compass .. |copy| unicode:: U+000A9 .. |data-lakes| replace:: Data Lakes .. |data-lake| replace:: Data Lake .. |datadog| replace:: Datadog .. |dns| replace:: abbr:DNS (Domain Name System) .. |Epoch-time-ms| replace:: Timestamp in the number of milliseconds that have elapsed since the UNIX epoch .. |epoch-time-ms| replace:: timestamp in the number of milliseconds that have elapsed since the UNIX epoch .. |Epoch-time| replace:: Timestamp in the number of seconds that have elapsed since the UNIX epoch .. |epoch-time| replace:: timestamp in the number of seconds that have elapsed since the UNIX epoch .. |fqdn| replace:: FQDN .. |fts| replace:: Full Text Search .. |gcp| replace:: GCP .. |global-write-clusters| replace:: Global Clusters .. |global-write-cluster| replace:: Global Cluster .. |global-write| replace:: Global Writes .. |https| replace:: HTTPS .. |http| replace:: HTTP .. |iam| replace:: IAM .. |iana| replace:: IANA .. |iops| replace:: IOPS .. |ipaddr| replace:: IP .. |ipv4| replace:: IPv4 .. |ipv6| replace:: IPv6 .. |iso8601-duration| replace:: Duration in ISO 8601 notation .. |iso8601-time| replace:: Timestamp in ISO 8601 date and time format in |utc| .. |iso8601| replace:: ISO 8601 .. |jira| replace:: Jira” .. |json| replace:: JSON .. |kdc| replace:: KDC .. |kmip| replace:: KMIP .. |kms| replace:: KMS .. |ldaps| replace:: LDAPS .. |ldap| replace:: LDAP .. |mms-full| replace:: MongoDB Cloud Manager .. |mms| replace:: Cloud Manager .. |nfs| replace:: NFS .. |nvme-clusters| replace:: clusters with local NVMe SSDs .. |pit| replace:: PIT .. |piv| replace:: PIV .. |rdp| replace:: RDP .. |restapi| replace:: REST API .. |rest| replace:: REST .. |s3| replace:: S3 .. |sak| replace:: SAK .. |service-fullname| replace:: MongoDB Atlas .. |service-pricing| replace:: Atlas pricing page .. |service| replace:: Atlas .. |sms| replace:: SMS .. |smtp| replace:: SMTP .. |snmp| replace:: SNMP .. |spn| replace:: SPN .. |ssd| replace:: SSD .. |ssl| replace:: SSL .. |stitch-docs| replace:: MongoDB Stitch .. |tcp| replace:: TCP .. |tls-ssl| replace:: TLS/SSL .. |tls| replace:: TLS .. |totp| replace:: TOTP .. |udp| replace:: UDP .. |upn| replace:: UPN .. |uri| replace:: URI .. |url| replace:: URL .. |utc| replace:: UTC .. |vpc| replace:: VPC .. |yaml| replace:: YAML