> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/1-10-0/documentation/backup-and-restore/volumes.md).

# Volumes

The most reliable way of creating a backup of all Connectware-related data is to backup all used Docker volumes completely. (This might not be possible due to unavailable root permissions, but is the most secure way of backup for all Connectware.) All volumes that have been defined from the `docker-compose.yml` file can be backed up, and if they are all restored on any docker environment, the Connectware installation is fully restored.

## Service Commissioning File Volume

In order to back-up all service commissioning file data, the `service-manager` volume must be backed up.

(In versions up to 1.0.82, the *protocol-mapper* volume(s) were also containing service commissioning file data, but starting with 1.0.83, all this data is stored only within the *service-manager* volume and there is no longer any actively used *protocol-mapper* volume.)

### Kubernetes

In a Kubernetes installation, the content of the persistent volume *service-manager* needs to be backed up. The name of the volume is starting with *service-manager* and may have certain suffixes. The way of creating a backup and restoring this depends on the storage providers that are used in a specific Kubernetes installation.

### Docker Compose

In a Docker Compose installation, the respective volume name is prepended by the Docker Compose project name. This project name is either given explicitly when running `docker compose` e.g. using the `-p` option, or is taken from the current working directory, such as `connectware`. If the project name is *connectware*, the respective volume name is *connectware\_service-manager*.

With the volume name given as e.g. *connectware\_service-manager*, the actual storage location on a local harddisk can be looked up using the command `docker volume inspect connectware_service-manager`. In a default docker configuration, this is the local harddisk directory

* `/var/lib/docker/volumes/connectware_service-manager/_data`

This directory must be backed up regularly, and restored if a restore operation is needed.

An example command (requiring root privileges) which creates a compressed backup file `/tmp/connectware-volume-backup.tgz` looks like this:

{% code lineNumbers="true" %}

```yaml
cd  /var/lib/docker/volumes; \
tar cvfz /tmp/connectware-volume-backup.tgz \
./connectware_service-manager/_data
```

{% endcode %}

To restore the volume data from the created backup file, use the following command:

{% code lineNumbers="true" %}

```yaml
cd  /var/lib/docker/volumes; \
rm -rf ./connectware_service-manager/_data/*; \
tar xvfz /tmp/connectware-volume-backup.tgz
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cybus.io/1-10-0/documentation/backup-and-restore/volumes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
