# Restore a MongoDB Cluster

You can restore a MongoDB cluster by using a snapshot reference. A cluster can have multiple snapshots for backup and are retained for seven days; hence, cluster recovery is possible for up to a week from the current date. For more information, see [<mark style="color:blue;">Backup and Recovery</mark>](https://docs.ionos.com/cloud/~/revisions/NfgM5VQuRjXRMfbR25yK/databases/mongodb/overview/backup-and-recovery).

{% hint style="info" %}
**Note:** MongoDB database cluster backups are available only in the following editions: **Business** and **Enterprise**. Backups are disabled for the **Playground** edition.
{% endhint %}

## Restore a Cluster

{% hint style="info" %}
**Note:**

* All the available MongoDB clusters that are part of your contract are listed on the **MongoDB cluster overview** page.
* You cannot revert the database restore operation once confirmed. For more information, see [<mark style="color:blue;">Backup and Recovery</mark>](https://docs.ionos.com/cloud/~/revisions/NfgM5VQuRjXRMfbR25yK/databases/mongodb/overview/backup-and-recovery).
* You cannot initiate a new database restore of a cluster from a snapshot when a restore is already in progress.
  {% endhint %}

{% tabs %}
{% tab title="Business" %}
1\. In the DCD, click **Menu** > **Databases** > **MongoDB**.

![Select MongoDB from the drop-down menu](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-fdaba76b6ecb7874b0c0f28cfaa2cc18f8ff2821%2Fmongodb-menu.png?alt=media)

2\. In the **MongoDB cluster overview** window, select the database cluster that is added for the **Business** edition by selecting a cluster from the list by clicking on its name or by selecting **Details** in the **OPTIONS** column.

![Alternative edit option](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-2dfb591204730e3b2d0c643f9ae8b6033b8208df%2Fmongodb-edit-alt.png?alt=media)

3. Select **Backups**.
4. In the **Backups** tab, choose the snapshot you want to use for restoring the database cluster from the list of available snapshots. Each snapshot displays the following details:
5. **Version:** The MongoDB version number of the database cluster.
6. **Created:** A date and time when the database snapshot was created. For more information on instances when the snapshots are added, see [<mark style="color:blue;">Backups</mark>](https://docs.ionos.com/cloud/~/revisions/NfgM5VQuRjXRMfbR25yK/databases/overview/backup-and-recovery#backups).
7. **Size:** Snapshot database cluster size (in MB).

![MongoDB snapshots](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-c915e82d493a433e4e587707af353f6c879f44e1%2Fmongodb-cluster-business-snapshots.png?alt=media)

5\. Click **Restore** on the snapshot selected for restoring the data in the cluster.

![MongoDB database restore confirmation](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-e2411ee858f0c21d1844683e894ff39f780dc39a%2Fmongodb-cluster-business-restore.png?alt=media)

{% hint style="success" %}
**Result:** The database restore from the selected snapshot is successfully initiated.
{% endhint %}
{% endtab %}

{% tab title="MongoDB Enterprise" %}
1\. In the DCD, click **Menu** > **Databases** > **MongoDB**.

![Select MongoDB from the drop-down menu](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-fdaba76b6ecb7874b0c0f28cfaa2cc18f8ff2821%2Fmongodb-menu.png?alt=media)

2\. In the **MongoDB cluster overview** window, select the database cluster that is added for the **Enterprise** edition by selecting a cluster from the list by clicking on its name or by selecting **Details** in the **OPTIONS** column.

![MongoDB Clusters](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-a19adf7fae707dedd364c99695bc496894e0b909%2Fmongodb-cluster-enterprise.png?alt=media)

3\. In the **Backups** tab, choose from the following two options to restore a database cluster:

a. **Point-in-time recovery:** Select **Point-in-time recovery** to restore the database cluster from a specific point-in-time of the database backup.

* Choose the backup time from the calendar displayed and click **Save**. The number of hours in the past from which the backup is possible is between 1 and 24 hours. The default value is 24 hours.

![Restore by time](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-e73682707203abf395f9bc2dc3c2edbe8385659b%2Fmongodb-backup-enterprise-restore.png?alt=media)

* You will receive a confirmation message that the backup is being restored.

![MongoDB database restore confirmation](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-525265f1d3a34b2a701ad9b00316b4711051e82a%2Fmongodb-restore-enterprise-success.png?alt=media)

b. **Restore:** Choose the snapshot you want to use for restoring the database cluster from the list of available snapshots.

* Click **Restore**.
* Confirm the database restore from the snapshot by clicking **Restore**.

![MongoDB snapshots](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-9f87cdc32e742aaa056729c9cad0643024079dfc%2Fmongodb-enterprise-backup-snapshot.png?alt=media)

**Note:** Each snapshot displays the following details:

* **Version:** The MongoDB version number of the database cluster.
* **Created:** A date and time when the database snapshot was created. For more information on instances when the snapshots are added, see [<mark style="color:blue;">Backups</mark>](https://docs.ionos.com/cloud/~/revisions/NfgM5VQuRjXRMfbR25yK/databases/overview/backup-and-recovery#backups).
* **Size:** Snapshot database cluster size (in MB).

{% hint style="success" %}
**Result:** The database restore from the selected snapshot is successfully initiated.
{% endhint %}
{% endtab %}
{% endtabs %}
