# Create Backup

<figure><img src="https://1973811904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Flk5l3lUfuUzRDnMDVwnw%2Fuploads%2F4Wlft7o8Y660LWQrKtfj%2F84e3e44a-dc87-4d12-a341-b1ad1ca3a5b8.jpeg?alt=media&#x26;token=eb253f7a-c175-427c-a45f-f384b35cc477" alt=""><figcaption><p>Image generated by an AI with MIT license</p></figcaption></figure>

## Backup the docker volumes

All important data is stored in the Docker volumes.

| Volumename                         | Description                                      |
| ---------------------------------- | ------------------------------------------------ |
| flyingfish\_flyingfish             | Data from backend with config and tmp files      |
| flyingfish\_flyingfishLetsencrypt  | Data from backend with Lets Encrypt certificates |
| flyingfish\_flyingfishDbData       | Database files from Mariadb server               |
| flyingfish\_flyingfishInfluxdbData | Database files from Influxdb server              |
| flyingfish\_flyingfishSsh          | Data from SSH jump server                        |

Install the following shell script to create a backup of the volume.

```sh
sudo curl -SL https://raw.githubusercontent.com/stefanwerfling/docker-volume-snapshot/main/docker-volume-snapshot -o /usr/local/bin/docker-volume-snapshot
```

```sh
sudo chmod +x /usr/local/bin/docker-volume-snapshot
```

If you are interested or have questions, you can learn more about [docker-volume-snapshot here](https://github.com/stefanwerfling/docker-volume-snapshot).

Now everything is over to back up the volumes.

```sh
docker-volume-snapshot create <volume name> <backup file name>.tar
```

## Restore the docker volumes

To restore the volume, first delete the old one (if it still exists).

```sh
docker volume rm <volume name>
```

Now it can be restored with the docker-volume-snapshot.

```sh
docker-volume-snapshot restore <backup file name>.tarh <volume name>
```


---

# 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://flying-fish.gitbook.io/flyingfish/index/installation/create-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.
