I asked how to save the configs, Pierre-Giles said:
You go to the folder where you saved your configuration (look at the Docker volume you set)
By default on the site we put everything in “/var/lib/gladysassistant”
In this folder there is a SQLite folder: it’s the Gladys DB that contains all your configuration, you can set it aside
The only thing that won’t be saved are the additional containers like Zigbee2mqtt, we don’t have a process to restart from the DB and rebuild these containers, but it would be worth it to be able to manage that
When I want to put it back in place, it shows me all the config but impossible to make Zigbee2mqtt work, indeed the links between Gladys - mqtt and Zigbee2mqtt are not functional.
While everything works well with the base file.
How can I put the old base back and make Zigbee2mqtt functional?
I think you need to restart Zigbee2mqtt in the integration. Unfortunately, I don’t think there’s a process to restart the containers on a new database!
So does that mean I need to restart the detection of all my elements?
Arf, it’s quite a hassle because they are fixed and not necessarily accessible…
In my opinion, this inability to save data and restore it is a real downside.
Does Gladys Plus solve this problem?
I’m asking because at the moment I don’t see myself spending €120/year just for this feature, I’m not at the point of needing the others.
The issue comes from the Gladys Zigbee2mqtt integration, which is not able to recover in case of backup/restoration on another instance.
There is a GitHub issue that has existed for a while but no one has taken it on yet:
Cc @AlexTrovato@cicoub13 There is an increasing demand to be able to restart an instance on another machine, it’s really great that the network_key, pan_id and channel are stored in the Gladys DB, it avoids having to re-configure everything when moving Gladys from one instance to another
Basically, the idea is to make sure the service can recover if we take the database from one instance and put it on another. Gladys must be able to restart Zigbee2mqtt with the same parameters, otherwise the user will have to re-pair all their equipment.
Don’t hesitate if you have other questions, we can discuss the implementation!
Now that I have received my RPI4, I have been able to run some tests.
I like to have a backup system when installing a new system, so I did some backup tests on the gladys database and zigbee2mqtt. It should be noted that I had installed gladys to start my tests on an old PC under ubuntu while waiting for my RPI4.
For gladys, no problem with the .db. For zigbee2mqtt, no problem either. I simply copied the configuration.yaml, coordinator_backup.json, and database.db files before activating zigbee2mqtt in gladys.
After copying these files, I activated zigbee2mqtt, gladys proceeded with the installation, and I found my devices functional without having to re-pair them.
Now I just have to write a bash script to automatically and regularly back up and export these files.