# Restore mongodb\_backup

### **Introduction**

Restoring a backup that was previously created via the [Preferences - Backup and Restore](/helmut4-releases/v4.10.1/helmut4-components/helmutfx/preferences.md#backup-and-restore) tab is the easiest option during a recovery or emergency situation.

### **Prerequisites**

If no manual backup exists, you can restore the most recent automatic backup created by the **mongobackup** container. Note that the container must be properly set up in advance. For further information, refer to *Define mongo\_db backup volume*.

### **Restoring a Backup**

1. Navigate to Portainer and select the **mongobackup** container in the **Containers** tab.
2. Establish a bash connection to the container and run the necessary commands.

<figure><img src="/files/fHwv1QOt5sJNqB93Wa6P" alt=""><figcaption><p>Establish a connection into the mongobackup container</p></figcaption></figure>

```bash
# List all available backups
ls /backup

# Restore a backup
./restore.sh /backup/2025-02-12-103029
```

### Creating a Backup

To create a manual backup, you have two simple options:

1. **Restart the mongobackup container:** A backup is automatically created each time the container starts successfully.
2. **Execute the backup script:** Establish a bash connection to the container and run the following command:

```bash
# Create a backup
./backup.sh
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.helmut.de/helmut4-releases/v4.10.1/getting-started/additional-configurations/restore-mongodb_backup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
