# Backup and Restore

Backup and restore are administrative operations in Connectware. They are used to ensure reliable recovery of a Connectware installation after critical circumstances like hardware or software failures.

The required data to backup consist of:

1. Configuration files stored in shared docker container volumes. (This is less critical if all service commissioning files have been deployed using automated tools such as Ansible or similar, though.)
2. Postgresql database for user, role, and permission setup.

The recommended way of Connectware backup is to automate the backup procedure and execute it regularly.

To restore Connectware properly, the data stored in the Docker volumes should be consistent with the user and permissions data stored in the database. Any creation or update of a Connectware service may result in a database change. It is recommended to start a backup of the Docker volumes and the database backup at approximately the same time. Also, during the backup operation there should be no changes in the service configuration. Only in this case the consistency in the restored Connectware instance data can be guaranteed.

It is generally possible to restore the database across versions, too, i.e. from an older Connectware version’s backup into a newer Connectware version. However, as Connectware is enhanced and new features are added, the database structure might change sometimes between versions. If there is such a change in the database structure, additional steps will be required as described below. This situation is going to be explained in the status message of the restore operation.

{% hint style="warning" %}
After a restore, Connectware should restart, and all Admin-UI browser sessions should be restarted as well.
{% endhint %}


---

# 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.cybus.io/1-10-2/documentation/backup-and-restore.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.
