# 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/sections-test/guides/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/sections-test/guides/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**, go to **Menu** > **Databases** > **MongoDB**.

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.

![MongoDB cluster overview](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-5cd56c3f7f29116b1e10c5c6b1c9e68062c94006%2Fmongodb-edit-alt-business.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:

* **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/sections-test/guides/databases/overview/backup-and-recovery#backups).
* **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-4972ba7b7765ff7a2637cf9ad3a5ddb76b05ae76%2Fmongodb-cluster-business-snapshots.png?alt=media)

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

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

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

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 cluster overview](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-724598eb523486fab779742405ca68ce7274f1a4%2Fmongodb-edit-alt-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-63d39e11bfe3d9418f06259891faf43b42cc7600%2Fmongodb-backup-enterprise-restore.png?alt=media)

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

![MongoDB database restore initiated](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-305c0bc62157904e92b5e67649639b85e69fdfd7%2Fmongodb-restore-enterprise-initiated.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**.

**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/sections-test/guides/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 %}
