# Backup der zigbee2mqtt-Datenbank

**URL:** <https://community.gladysassistant.com/t/sauvegarde-de-la-db-de-zigbee2mqtt/7237>\
**Category:** Tutoriels\
**Tags:** zigbee2mqtt\
**Created:** [3. Mai 2022 um 10:16 UTC](https://community.gladysassistant.com/t/sauvegarde-de-la-db-de-zigbee2mqtt/7237 "2022-05-03T10:16:57Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [30. Mai 2022 um 19:42 UTC](https://community.gladysassistant.com/t/sauvegarde-de-la-db-de-zigbee2mqtt/7237/19 "2022-05-30T19:42:16Z")

</div>

In der Theorie:

1. der Container z2m existiert nicht

- wenn keine Informationen in der DB gespeichert sind: Erstellung des Containers mit Werten, die vom Image generiert werden, dann Lesen dieser Werte zur Sicherung in der DB
- wenn die Werte in der DB sind: Erstellung des Containers mit den gespeicherten Werten

1. wenn der Container z2m existiert

- Sicherung in der DB (Überschreiben, wenn die Variablen bereits existieren)

Der PR ist vorerst nur in meinem persönlichen Bereich

> <https://github.com/atrovato/Gladys/pull/47>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[\] If your changes affects code, did your write the tests?
> \- \[\] Are tests passing? (\`npm test\` on both front/server)
> \- \[\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to \[the community\](https://community.gladysassistant.com/) for testing before merging.
> \- \[\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!

Ich habe die Gelegenheit genutzt, um einige Schwere in den Tests und einige Logs zu ändern.

---

_[View the full topic](https://community.gladysassistant.com/t/sauvegarde-de-la-db-de-zigbee2mqtt/7237)._
